Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parallel Query - using hints for multiple 'from' tables

484531Apr 25 2006 — edited Apr 25 2006
Currently I am running the following (simplified) query:
INSERT /*+ APPEND */ INTO NEW_TAB (ID)
SELECT DISTINCT T1.BIG_ID
FROM   BIG_TAB1 T1, BIG_TAB2 T2
WHERE  T1.BIG_ID = T2.ID2
AND    T2.METHOD = 1
AND    T1.CODE IN ( /*16 codes here*/ );
When this migrates to the production platform the DBAs have asked me to code it for parallel processing.
We implement 4 processors for parallel processing and so usually I would do the following hint between INSERT and INTO;
/*+ PARALLEL (BIG_TAB1, 4) */
As my query here accesses two tables how would I modify this statement to make it run in parallel? Would it be;
INSERT /*+ PARALLEL (BIG_TAB1, 4) */ /*+ PARALLEL (BIG_TAB2, 4) */ INTO NEW_TAB (ID)
SELECT DISTINCT T1.BIG_ID
?

Thanks for any help!

fakelvis
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 23 2006
Added on Apr 25 2006
3 comments
3,509 views