Answers

Question and Answer:

  Home  Oracle DBA

⟩ What is the difference between Truncate and Delete? Why is one faster? Can we ROLLBACK both? How would a full table scan behave after?

Truncate is nearly instantaenous, cannot be rolled back, and is fast because Oracle simply resets the HWM. When a full table scan is performed on a table, such as for a sort operation, Oracle reads to the HWM. So if you delete every single solitary row in 10 million row table so it is now empty, sorting on that table of 0 rows would still be extremely slow.

 192 views

More Questions for you: