18 June 2014

Oracle Apps : Truncate VS Delete


Truncate will effectively just move the high water mark of a table back to "zero" and either release allocated space back to dba_free_space or keep it for the segment. It just moves a pointer and says "magically there is no data in this table". It doesn't actually touch the data, it just says "we don't have it anymore"


Delete physically deletes, row by row. It deletes from the table, it deletes the index entry. The space is not given back and the high water marks stay exactly where they are. if there were a million rows in the table, the high water mark will be at the million row mark (or above).

No comments: