Slow query execution in an empty table. (after deleting a large amount of inserts)

Stefanos Kargas picture Stefanos Kargas · Dec 10, 2010 · Viewed 12k times · Source

I have a table in an oracle database with 15 fields. This table had 3500000 inserts. I deleted them all.

delete
from table

After that, whenever I execute a select statement
I get a very slow response (7 sec) even though the table is empty. I get a normal response only in the case that I search according to an indexed field.

Why?

Answer

Please delete me picture Please delete me · Dec 10, 2010

Tom Kyte has a good explanation of this issue:

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:492636200346818072

It should help you understand deletes, truncates, and high watermarks etc.