国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

Oracle 11g索引的碎片分析

2019-11-09 13:32:30
字體:
供稿:網(wǎng)友

  數(shù)據(jù)被刪除之后,索引只是加了一個(gè)標(biāo)記,并沒有真正的刪除,這樣可以查看碎片率。

drop table test purge;

create table test as select * from dba_objects;insert into test select * from test;insert into test select * from test;commit;create index ind_t_object_id on test(object_id);analyze index ind_t_object_id validate structure;select s.height,       round((del_lf_rows_len / lf_rows_len) * 100, 2) || '%' frag_ratio,       s.pct_used  from index_stats s where s.name = 'IND_T_OBJECT_ID';    HEIGHT FRAG_RATIO      PCT_USED---------- ------------- ----------         3      0%              90          delete from test where object_type in('SYNONYM','java CLASS');commit;analyze index ind_t_object_id validate structure;select s.height,       round((del_lf_rows_len / lf_rows_len) * 100, 2) || '%' frag_ratio,       s.pct_used  from index_stats s where s.name = 'IND_T_OBJECT_ID';    HEIGHT FRAG_RATIO      PCT_USED---------- ------------- ----------         3 70.23%               90  delete from test where object_type in('VIEW','INDEX','TABLE','TYPE');commit;analyze index ind_t_object_id validate structure;select s.height,       round((del_lf_rows_len / lf_rows_len) * 100, 2) || '%' frag_ratio,       s.pct_used  from index_stats s where s.name = 'IND_T_OBJECT_ID';    HEIGHT FRAG_RATIO        PCT_USED---------- --------------- ----------         3 89.53%               84
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 铜梁县| 吴江市| 缙云县| 电白县| 泾阳县| 大连市| 咸丰县| 万盛区| 常州市| 叶城县| 依兰县| 屏东县| 安西县| 峨边| 射阳县| 仁寿县| 庆阳市| 陇川县| 海丰县| 贵港市| 和林格尔县| 池州市| 开化县| 乌鲁木齐市| 广宗县| 乡城县| 玉溪市| 疏附县| 云浮市| 瓮安县| 孟村| 长治县| 贵溪市| 鄂托克旗| 错那县| 岳阳市| 琼中| 大余县| 伊宁市| 襄汾县| 定安县|