[20131017]11G下truncate的新特性.txt
[20131017]11G下truncate的新特性.txt
11.2.0.2中出現truncate的新特性,截斷表目前有了新選項:即drop all storage。
測試看看:
SCOTT@test> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
SCOTT@test> create table t as select rownum id ,'test' name from dual connect by level <=2e4 ;
Table created.
SCOTT@test> create index i_t_id on t(id);
Index created.
SCOTT@test> exec dbms_stats.gather_table_stats('','T',cascade=>TRUE);
PL/SQL procedure successfully completed.
SCOTT@test> analyze index i_t_id validate structure;
Index analyzed.
SCOTT@test> truncate table t drop all storage;
Table truncated.
SCOTT@test> select segment_name,blocks from dba_segments where segment_name in ('T','I_T_ID') and wner=user;
no rows selected
--以上可以看到在普通使用者模式下對錶truncate drop all storage後,該表相關的segment均被事實上的drop了。
11.2.0.2中出現truncate的新特性,截斷表目前有了新選項:即drop all storage。
測試看看:
SCOTT@test> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
SCOTT@test> create table t as select rownum id ,'test' name from dual connect by level <=2e4 ;
Table created.
SCOTT@test> create index i_t_id on t(id);
Index created.
SCOTT@test> exec dbms_stats.gather_table_stats('','T',cascade=>TRUE);
PL/SQL procedure successfully completed.
SCOTT@test> analyze index i_t_id validate structure;
Index analyzed.
SCOTT@test> @i
HEIGHT BLOCKS NAME LF_ROWS LF_BLKS LF_ROWS_LEN LF_BLK_LEN BR_ROWS BR_BLKS BR_ROWS_LEN BR_BLK_LEN DEL_LF_ROWS DEL_LF_ROWS_LEN DISTINCT_KEYS
---------- ---------- ---------- ---------- ---------- ----------- ---------- ---------- ---------- ----------- ---------- ----------- --------------- -------------
2 56 I_T_ID 20000 44 309700 7996 43 1 496 8028 0 0 20000
MOST_REPEATED_KEY BTREE_SPACE USED_SPACE PCT_USED ROWS_PER_KEY BLKS_GETS_PER_ACCESS PRE_ROWS PRE_ROWS_LEN OPT_CMPR_COUNT OPT_CMPR_PCTSAVE
----------------- ----------- ---------- ---------- ------------ -------------------- ---------- ------------ -------------- ----------------
1 359852 310196 87 1 3 0 0 0 0
SCOTT@test> select segment_name,blocks from dba_segments where segment_name in ('T','I_T_ID') and wner=user;
SEGMENT_NAME BLOCKS
-------------------- ----------
T 48
I_T_ID 56
SCOTT@test> truncate table t drop all storage;
Table truncated.
SCOTT@test> select segment_name,blocks from dba_segments where segment_name in ('T','I_T_ID') and wner=user;
no rows selected
--以上可以看到在普通使用者模式下對錶truncate drop all storage後,該表相關的segment均被事實上的drop了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-774522/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【ORACLE新特性】11G 分割槽新特性Oracle
- oracle 11g 的新特性Oracle
- Oracle 12C 新特性之級聯truncateOracle
- Oracle 11g 新特性Oracle
- 11g分佈表新特性——Interval分割槽(下)
- [20111220]listagg 11G的新特性.txt
- 11g data guard 新特性
- 11g新特性--active dataguard
- 11G新特性:FLASHBACK ARCHIVEHive
- Java 11 的新特性(下)Java
- 11G新特性,待定的統計資訊
- 11G Flashback Data Archive新特性的研究Hive
- 11g新特性:Pending Statistics
- Oracle 11g 新特性簡介Oracle
- Oracle 11g 新特性之DRCPOracle
- 11g 新特性—— Active Database DuplicationDatabase
- Oracle 11g新特性:Result CacheOracle
- 11g新特性--result caching
- Oracle 11g 新特性(轉載)Oracle
- 11G新特性:FLASHBACK ARCHIVE - 01Hive
- 11G新特性:FLASHBACK ARCHIVE – 02Hive
- Oracle 11g新特性之SecureFilesOracle
- 11g新特性:不可視索引索引
- 11g新特性--pending statistics
- [20130730]11G的DRCP特性.txt
- goldengate 11g patch set 1的新特性Go
- Oracle 11g的新特性分割槽:System PartitionOracle
- oracle DG 11g新特性彙總Oracle
- ORACLE 11G新特性之列新增操作Oracle
- 【11g新特性】(I/O calibration)
- Oracle 11g 新特性 -- SecureFiles 說明Oracle
- 11g新特性--invisible indexIndex
- oracle 11g 新特性 表壓縮Oracle
- 【DataGuard】11g 新特性:Active Data Guard
- 11G 新特性: 新加的提示 CHANGE_DUPKEY_ERROR_INDEXErrorIndex
- 新特性:/dev/shm對Oracle 11g的影響devOracle
- 【11g新特性】DDL_LOCK_TIMEOUT的作用
- 11G result cache新特性的更多深入研究