How To Reclaim All Space With Truncate Table
Last updated on DECEMBER 01, 2016
Applies to:Oracle Database - Enterprise Edition - Version 126.96.36.199 to 188.8.131.52 [Release 11.2]
Information in this document applies to any platform.
***Checked for relevance on 01-Dec-2016***
Using the TRUNCATE statement provides a fast, efficient method for deleting all rows from a table or cluster. A TRUNCATE statement does not generate any undo information and it commits immediately. It is a DDL statement and cannot be rolled back. A TRUNCATE statement does not affect any structures associated with the table being truncated (constraints and triggers) or authorizations. A TRUNCATE statement also specifies whether space currently allocated for the table is returned to the containing tablespace after truncation.
In previous release 11gR1 when a truncate was executed Oracle keeps the segment associated with a table. Oracle 11gR1 does provide the DROP STORAGE and REUSE STORAGE clauses but the DROP STORAGE clause only drops extents beyond the minimum extents.
Starting with Oracle 11gR2 (184.108.40.206), a TRUNCATE statement can also specify the DROP ALL STORAGE clause to release the space currently allocated for a table to the containing tablespace.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms