Home » RDBMS Server » Performance Tuning » Multi-Insert in Parallel
Multi-Insert in Parallel [message #147657] Fri, 18 November 2005 18:01 Go to next message
scottwmackey
Messages: 515
Registered: March 2005
Senior Member
I have a simple question that I cannot seem to find a straightforward answer in the documentation. I have a multi-insert statement that I want to execute in parallel. If I can't get parallism within tables, I would at least like to have it between tables. It is quite possible that all three insert conditions will be true for a give select row. What is the minimum I need to add to the statement below to get it to run in parallel? Also, temp_1 and temp_2 really are GLOBAL TEMPORARY tables, if that makes a difference.
INSERT /*+PARALLEL*/ ALL
WHEN warning IS NOT NULL THEN
    INTO   fu_error_log
           (...)
    VALUES (...)
WHEN acct_rnk = 1 THEN
  INTO   temp_1
         (...)
  VALUES (...)
WHEN class_rnk = 1 THEN
  INTO   temp_2
         (...)
  VALUES (...)
SELECT  ...
FROM    various_tables;
Re: Multi-Insert in Parallel [message #149182 is a reply to message #147657] Wed, 30 November 2005 08:18 Go to previous message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
I haven't done much with parallel DML (dml in this case being insert, update, delete, merge), but I do recall that you have to explicitly enable it, typically at the session level, for it to kick in. It is a different situation than with parallel query, which is easily and by comparison automatically enabled just by setting the degree on a table or the parallel hint.

Don't know if the tables being temp tables matters or not, but if I were researching more I'd start searching for "parallel DML".
Previous Topic: execute immediate with bind variables
Next Topic: temp segment error
Goto Forum:
  


Current Time: Thu Apr 25 05:55:25 CDT 2024