Opened 8 weeks ago

Closed 8 weeks ago

#35295 closed Cleanup/optimization (fixed)

Use INSERT with multiple rows on Oracle 23c+

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: Database layer (models, ORM) Version: 5.0
Severity: Normal Keywords: oracle
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Oracle 23c finally allows to INSERT multiple rows into a table in a single step without a UNION-SELECT workaround 🎉

https://oracle-base.com/articles/23c/table-values-constructor-23c#insert

Change History (7)

comment:1 by Mariusz Felisiak, 8 weeks ago

Has patch: set

comment:2 by David Smith, 8 weeks ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 8 weeks ago

Patch needs improvement: set

The current patch fails on field_defaults.tests.DefaultTests.test_bulk_create_mixed_db_defaults_function:

django.db.utils.DatabaseError: ORA-01797: this operator must be followed by ANY or ALL

comment:4 by GitHub <noreply@…>, 8 weeks ago

In 33c06ca0:

Refs #32673, Refs #35295 -- Avoided wrapping rhs direct values in lookups.

comment:5 by Mariusz Felisiak, 8 weeks ago

Patch needs improvement: unset

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 8 weeks ago

In 912f72a:

Refs #35295 -- Added BaseDatabaseOperations.bulk_insert_sql().

Co-authored-by: Nick Pope <nick@…>

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 8 weeks ago

Resolution: fixed
Status: assignedclosed

In 175b049:

Fixed #35295 -- Used INSERT with multiple rows on Oracle 23c.

Note: See TracTickets for help on using tickets.
Back to Top