2017年(38)
分类: 数据库开发技术
2017-12-07 13:48:13
1.move
analyze table GC.R_WIP_KEYPARTS_T compute statistics;
SELECT BLOCKS,EMPTY_BLOCKS FROM DBA_TABLES
WHERE OWNER='GC' AND TABLE_NAME='R_WIP_KEYPARTS_T';
BLOCKS:137452
EMPTY_BLOCKS:1812
SELECT BLOCKS FROM DBA_SEGMENTS
WHERE SEGMENT_NAME='R_WIP_KEYPARTS_T';
BLOCKS:139264
DELETE from GC.R_WIP_KEYPARTS_T where rownum<5000;
這是數據被刪除,但HWM不會下降。
select count(distinct dbms_rowid.rowid_block_number(rowid)) from GC.R_WIP_KEYPARTS_T;
可以看到當前行所占的block數。肯定比BLOCKS:137452少