- 最后登录
- 2016-6-22
- 在线时间
- 43 小时
- 威望
- 0
- 金钱
- 160
- 注册时间
- 2012-12-7
- 阅读权限
- 10
- 帖子
- 38
- 精华
- 0
- 积分
- 0
- UID
- 793
|
4#
发表于 2013-1-6 09:27:43
- CREATE TABLE T
- AS
- SELECT * FROM DBA_OBJECTS;
- SELECT COUNT(1) FROM T;
- -84024
- CREATE INDEX IDX_T_OBJECT_ID ON T(OBJECT_ID);
- SELECT SEGMENT_NAME, SEGMENT_TYPE, BYTES, BLOCKS, EXTENTS
- FROM USER_SEGMENTS
- WHERE SEGMENT_NAME IN ('T', 'IDX_T_OBJECT_ID');
- --IDX_T_OBJECT_ID INDEX 2097152 256 2
- --T TABLE 10485760 1280 10
- DELETE FROM T WHERE ROWNUM <= 50000;
- COMMIT;
- ALTER TABLE T ENABLE ROW MOVEMENT;
- ALTER TABLE T SHRINK SPACE CASCADE;
- SELECT SEGMENT_NAME, SEGMENT_TYPE, BYTES, BLOCKS, EXTENTS
- FROM USER_SEGMENTS
- WHERE SEGMENT_NAME IN ('T', 'IDX_T_OBJECT_ID');
- --IDX_T_OBJECT_ID INDEX 1048576 128 1
- --T TABLE 4194304 512 4
复制代码 |
|