Skip to Main Content
  • Questions
  • Create an Table optimally designed for many parallel DML queries (INSERT/UPDATE)

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Michael.

Asked: February 14, 2025 - 11:56 am UTC

Last updated: February 25, 2025 - 1:11 am UTC

Version: 19c (on premise)

Viewed 1000+ times

You Asked

I would like to create a table in an Oracle 19c DB (on premise) that is optimally designed for many parallel DML queries (INSERT/UPDATE).
What do I have to pay attention to?
Does partitioning help, with different tablespaces?
How must sequences be created or should sequences be omitted?
How should indices be created?
...

and Connor said...

For query, any table can be read in parallel without any special regard needed for how it is structured. RAC can be a different proposition because sometimes we'll partition to increase the node affinity (ie, less data going between nodes).

For update, that depends on concurrency. Parallel DML (ie data changing) locks the segment concerned, so whilst you can have "n" worker threads smashing at table, they all belong to a single driving parallel DML operation.

If you wanted to have multiple independent sessions, each performing parallel DML on the same table, then you'd need to

- partition the table
- typically customise the SQL so that a given session (and all of its parallel workers) targets a single partition.

Sequences are of little worry as long as they are cached well, or set to scaleable. ( https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-SEQUENCE.html )

Indexes hurt parallel *update* performance in the same way they hurt serial update performance. It is common for people to set their indexes to unused for large scale parallel update. For query, index usage is decided by the optimizer in the normal way - just typically the optimizer will often steer clear of them because you're often scanning large volumes of data.


Rating

  (2 ratings)

Comments

Thank you for the answer and a add. information

Michael, February 17, 2025 - 8:32 am UTC

I forgot to say that it is mainly about avoiding the ORA-12609 error. Which always occurs when many session inserts/updates to the table are attempted
Connor McDonald
February 24, 2025 - 3:24 am UTC

TNS timeout?

AWR report

Michael, February 24, 2025 - 9:20 am UTC

Today between 04:55 am - 05:10 am we got the error
ORA-12609 again. They were only avg 5 different session for insert in the table. Every session did 1 insert and max. 3 updates on the table. I put the awr report to task. It is possible to upload the awr report ?
Connor McDonald
February 25, 2025 - 1:11 am UTC

Email it to asktom_us@oracle.com with subject line: Q9549347800346986528

The report will be deleted once used and not published here.

More to Explore

VLDB

If you are new to partitioning, check out Connor McDonald's introduction series here.

VLDB

Documentation set on VLDB and Partitioning.