1.

What Is The Difference Between Truncate And Delete? Why Is One Faster? Can We Rollback Both? How Would A Full Table Scan Behave After?

Answer»

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.

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.



Discussion

No Comment Found