Wednesday, April 11, 2012

Delete statement was very slow in Oracle

I have a table had about 100k records and I want to delete some rows, the problem is the DELETE statement is very slow which didn't finish in 30 minutes. but the select statement was return in 1s.



the SELECT statement and DELETE statement is as below:



select * from daily_au_by_service_summary where summary_ts >= to_date('09-04-2012','dd-mm-yyyy') order by summary_ts desc;



delete from daily_au_by_service_summary where summary_ts > to_date('09-04-2012','dd-mm-yyyy');



This table have the only index at summery_ts.



What could be the reason? thanks.





No comments:

Post a Comment