For Faster Delete statement [message #171878] |
Fri, 12 May 2006 00:37 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
bhadresh4u
Messages: 41 Registered: May 2005 Location: Japan
|
Member |
|
|
Hi..,
I wants to tune my Delete statement. it's take too much time..
see the below statement and tell me how to tune it by using the optimizr Hint or any else suggesion..!
DELETE FROM tab1 t
WHERE (t.input_dt < v_start_dt OR t.input_dt > v_end_dt )
AND no_col1 = 0 ;
Indexes : ( input_dt + No_col1 )
I used the /*+ NOLOGGING */ Hint to optimise it ... but it was not tuned..! so what to do to tune it...?
Thanks in advnce
Bhadresh
|
|
|
|
Re: For Faster Delete statement [message #171981 is a reply to message #171893] |
Fri, 12 May 2006 14:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
jrich
Messages: 35 Registered: February 2006
|
Member |
|
|
Without more info it is difficult to give advice, but if you are deleting a large % of the table, a CTAS filtering on the rows you want to keep and then replacing the table is usually better.
JR
|
|
|