Skip to Main Content

SQL Developer

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!

Delete Query

2745276Sep 3 2014 — edited Sep 4 2014

Hello All,

Greetings for the day !!

Recently one of our weekly production Job started processing for long time. From the AWR report for the job run time frame we could see that delete query is taking 0.20 seconds for each execution. For every single row deletion the delete query is taking 0.20 seconds.

Basically a select query is executed  on table A based on few condition which will retrieve say 18 k records  whose transactions has to be committed for the week. This 18k records are further divided into a batch of 1000 records  and  in a for loop  each record is passed to a function and if the function returns  success then the record is deleted from the table A . So for each success the row is deleted the delete query is taking around 0.20 sec for each execution. So if there are 18K records the time taken is around 3500 seconds

Also we are collecting the stats on A before the job is triggered on the table A.

Also from the execution plan we could see that the sql statement is ignoring the index and going for a full table scan and the table A has  around 200000 rows.

Please share your thoughts on the same.

Thanks and Regards,

Syed

Comments

644275
First, create a workspace on the drive that you want to save the file in and then try saving you file using File -> Save As and then select that workspace.
IHodgetts
Something else you might find useful is to have a shared (mapped) drive to store scripts centrally. See the post below:

882392
682072
thanks.....this information is useful
679279
hi

you can store the scripts in one of the workspace available in OATS.
you wont get a chance to create the work space in other drive then in which OATS is installed.

but if you need to make a back up of scripts then simply copy and paste it wherever you want them,and whenever you need to run the script then copy it and paste to one of the workspace of OATS.

hope will help you

regards
Umesh

Edited by: USoni on May 15, 2009 3:41 AM
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 2 2014
Added on Sep 3 2014
1 comment
621 views