标签:
SQL> select * from tab; TNAME TABTYPE CLUSTERID ------------------------------ ------- ---------- TEST1 TABLE SQL> select segment_name,bytes from user_segments; ----还没有给分配空间 no rows selected SQL> insert into test1 select * from dba_objects where rownum<2; -----插入一行记录 1 row created. SQL> select segment_name,bytes from user_segments; ----分配空间 SEGMENT_NAME BYTES ------------------------------ ---------- TEST1 65536 SQL> commit; Commit complete. SQL> alter table test1 allocate extent; ------手动给表分配一个区 Table altered. SQL> select segment_name,bytes from user_segments; SEGMENT_NAME BYTES ------------------------------ ---------- TEST1 131072 SQL> truncate table test1; ------使用不加子句的truncate Table truncated. SQL> select segment_name,bytes from user_segments; -----只是删除到最小的区 SEGMENT_NAME BYTES ------------------------------ ---------- TEST1 65536 SQL> truncate table test1 drop all storage; -----使用11g中新加的子句drop all stroage Table truncated. SQL> select segment_name,bytes from user_segments; -----段全部被回收 no rows selected
Oracle 11g新特性延迟段创建和truncate的增强
标签:
原文地址:http://www.cnblogs.com/haoxiaoyu/p/4244397.html