Name

TRUNCATE CLUSTER

Synopsis

TRUNCATE CLUSTER
[schema.]cluster_name]
    [{DROP | REUSE} STORAGE]

Removes all rows from a cluster (cluster_name).

Keywords

DROP STORAGE

Deallocates the storage used by the rows and returns the space to the free space pool. This is the default.

REUSE STORAGE

Retains the space used by the deleted rows. This is useful if the table or cluster will be reloaded with data.

Notes

The cluster to be truncated must be in your schema, or you must have the DROP ANY TABLE privilege to truncate a cluster in another schema. The TRUNCATE command does not create rollback records, so it cannot be rolled back. This characteristic makes TRUNCATE extremely fast, and it is preferable to DELETE FROM unless the rollback capability is required. When a table is truncated and the DROP STORAGE clause is specified, only the initial extent of the table is retained; all other storage is deallocated.

Example

The following example removes all the rows from scott’s empcluster cluster and deallocates the space used:

TRUNCATE CLUSTER scott.empcluster
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset