However note that running MERGE statement in parallel can cause error situations, this happens mostly due to the fact that each parallel process tries to insert a row that doesn't exist causing primary key violations.
Here's a simple example:
Merge into
Using (select col1, col2, col3 from src_table) s
On (d.col1 = s.col1)
When matched then
Update set d.col2 = s.col2,
d.col3 = s.col3
When not matched then
Insert (d.col2, d.col3) values (s.col2, s.col3);
No comments:
Post a Comment