Skip to Main Content

Oracle Database Discussions

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 execution is slower than serial!! [resolved]

movilogoMay 6 2009 — edited May 6 2009
For a benchmark test, I am running folowing simple procedure to update all reocords in a table.
  PROCEDURE UPDATE_CUSTOMER IS
  CURSOR cAllRecords IS SELECT * FROM CUSTOMER;
  BEGIN
       -- update all records in a loop
       FOR i IN cAllRecords
       LOOP
           UPDATE CUSTOMER SET car_reg = 'ABC123' WHERE custno = i.custno;
           COMMIT;
       END LOOP;
       DBMS_OUTPUT.put_line('Records updated');
  END UPDATE_CUSTOMER; 
The table has around 1 million records.

When the table is partitioned (3-way), it is running over 15 minutes!!
But for normal table, it finishes in 3 minutes!

What is going wrong? I repeated test multiple times with same result.

On the other hand, when I just fire my SQL like this:
 UPDATE tablename SET car_reg = 'ABC123' 
The partitioned table is 3 times faster!

Edited by: movilogo on May 6, 2009 2:52 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 3 2009
Added on May 6 2009
14 comments
992 views