Speeding up DELETE statement
User01May 31 2012 — edited Jun 4 2012Hi,
I have the below delete statement which is taking 5 mins for 15,82,000 rows. I have looked at the explain plan for the below statement, it is using index on db_name column.
delete from cam_tab_meta a where db_name like 'cam01'
I wanted to speed up the above statement. I used parallel hint and looked at the explain plan i didn't execute this. It is not using parallel PX COORDINATOR it is giving me the same explain plan as of the above statement.
delete /*+ PARALLEL (a,4) */ from cam_tab_meta a where db_name like 'cam01'
If i use the below statement then it is using parallel PX COORDINATOR in the explain plan but it is full table scan cost is more than the above first statement
delete /*+ PARALLEL (a,4) */ from cam_tab_meta a
I want to use the parallel PX COORDINATOR and the index on db_name column inorder to get lower cost than the first statement so that query can execute in less than 5 minutes, please let me know how to write the delete statement. (OR) If there is another means of speeding up the delete statement so that it takes less than 5 minutes please let me know.
Thanks