国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 丰镇市| 黄骅市| 峡江县| 如东县| 土默特右旗| 磐石市| 扶沟县| 南投县| 紫云| 名山县| 双柏县| 河东区| 利辛县| 无锡市| 凤台县| 晋江市| 湖口县| 通海县| 马尔康县| 赤壁市| 阜阳市| 清丰县| 温宿县| 缙云县| 道孚县| 板桥市| 陵水| 红原县| 汉源县| 丹寨县| 龙川县| 桑日县| 亚东县| 梁山县| 东兰县| 长宁县| 霍邱县| 象州县| 开江县| 海晏县| 辉南县|