索引系列六--索引特性之高度较低的验证体会
admin
2023-05-14 22:42:27
0

sqlplus ljb/ljb

drop table t1 purge;

drop table t2 purge;

drop table t3 purge;

drop table t4 purge;

drop table t5 purge;

drop table t6 purge;

drop table t7 purge;



create table t1 as select rownum as id ,rownum+1 as id2,rpad('*',1000,'*') as contents from dual connect by level<=1;

create table t2 as select rownum as id ,rownum+1 as id2,rpad('*',1000,'*') as contents from dual connect by level<=10;

create table t3 as select rownum as id ,rownum+1 as id2,rpad('*',1000,'*') as contents from dual connect by level<=100;

create table t4 as select rownum as id ,rownum+1 as id2,rpad('*',1000,'*') as contents from dual connect by level<=1000;

create table t5 as select rownum as id ,rownum+1 as id2,rpad('*',1000,'*') as contents from dual connect by level<=10000;

create table t6 as select rownum as id ,rownum+1 as id2,rpad('*',1000,'*') as contents from dual connect by level<=100000;

create table t7 as select rownum as id ,rownum+1 as id2,rpad('*',1000,'*') as contents from dual connect by level<=1000000;



create index idx_id_t1 on t1(id);

create index idx_id_t2 on t2(id);

create index idx_id_t3 on t3(id);

create index idx_id_t4 on t4(id);

create index idx_id_t5 on t5(id);

create index idx_id_t6 on t6(id);

create index idx_id_t7 on t7(id);


set linesize 1000

set autotrace off

select index_name,

          blevel,

          leaf_blocks,

          num_rows,

          distinct_keys,

          clustering_factor

     from user_ind_statistics

    where table_name in( 'T1','T2','T3','T4','T5','T6','T7');



INDEX_NAME  BLEVEL LEAF_BLOCKS   NUM_ROWS DISTINCT_KEYS CLUSTERING_FACTOR

------------------ ----------- ---------- ------------- -----------------

IDX_ID_T1        0           1          1             1                 1

IDX_ID_T2        0           1         10            10                 2

IDX_ID_T3        0           1        100           100                15

IDX_ID_T4        1           3       1000          1000               143

IDX_ID_T5        1          21      10000         10000              1429

IDX_ID_T6        1         222     100000        100000             14286

IDX_ID_T7        2        2226    1000000       1000000            142858


已选择7行。    


相关内容

热门资讯

产学研各界代表齐聚一堂,共议A... 封面新闻记者 易弋力 20支战队4小时巅峰对决;三位大咖三个不同视角解读“技术打法+产业路径+数据洞...
评论丨香蕉复仇、蓝莓出轨?警惕... AI技术降低了创作门槛,不等于降低了质量门槛和责任门槛;可以利用AI“手搓”短剧,但不应没下限地制造...
人工智能如何重塑电影行业?中国... 北京5月15日电 (记者 孙自法)人工智能生成内容(AIGC)正为众多行业带来深刻巨变,引发广泛关注...
济南隆超取得便捷式喷涂装置专利... 国家知识产权局信息显示,济南隆超石油机械锻造有限公司取得一项名为“一种便捷式喷涂装置”的专利,授权公...
原创 国... ## 国际空间站宇航员在微重力环境下与新鲜水果合影 维生素C很重要,即使在太空中也是如此。 来源:...
原创 低... 手机厂商的618活动陆续都开启了,在苹果宣布iPhone 17 Pro系列降价千元后,华为也迅速跟进...
微信第一行代码曝光! IT之家 5 月 15 日消息,据 CCF 计算机博物馆官方消息,2026 年 5 月 15 日,中...
光鼎电子取得LED数码管灌胶设... 国家知识产权局信息显示,连云港光鼎电子有限公司取得一项名为“一种LED数码管灌胶设备”的专利,授权公...
“兰州瓜农刺死城管”案二审维持... “兰州瓜农刺死城管”案有新进展。澎湃新闻从瓜农王爱文及其辩护律师处了解到,5月15日,甘肃省高院对此...
美国随访记者吐槽在北京被罚款,... 执笔/胡一刀&月半刀&宝刀刀美国福克斯新闻台的主持人,想在北京街头,拍一个阴阳中国社会治理的故事。当...