Clustering FactorClustering FactorClustering FactorClustering FactorCF, I/O CFROWID1~15ROWID4201CFROWID55CF=5CF2CFROWID20[4()+4()+4()+4()+4() = 20]CF=20CF 1 2rowidrowid1. 3 23 ROWID Clustering Factor +0 Clustering Factor 1 34 ROWID Clustering Factor Clustering Factor 145ROWIDClustering Factor +0 Clustering Factor 1
INDEX RANGE SCANINDEX FULL SCANINDEX UNIQUE SCANINDEX FAST FULL SCAN I/O 1 000 buffer cache 1000 I/O 1000 1 000 I/O I/O I/OCFI/OCFROWIDdb file sequential readI/OCFSQLCFORACLEIRS
IRS COST=I/O COST + CPU COST I免费云主机域名/O COST = INDEX ACCESS I/O COST + TABLE ACCESS I/O COST:INDEX ACCESS I/O COST = BLEVEL+CEIL(#LEAF_BLOCKS*IX_SEL)TABLE ACCESS I/O COST = CEIL(CLUSTERING_FACTOR*IX_SEL_WITH_FILTERS)—— DBA_INDEXESCLUSTING_FACTORCFCFSQL123()create table new_table as select … from old_table order by indexd_column4table_cached_blocks5set_index_statsclstfct1233.13.2table_cached_blocks3.3set_index_statsclstfct/* 6 *//* id
/* 1*//* *//* ID
/* 223*//* */db file sequential read/* tmp_cftmp_cf_3 *//* *//* *//* */112C(11g)23125514/*ID
/* *//* id
/* TABLE_CACHED_BLOCKSCBO*/TABLE_CACHED_BLOCKS3IDidIDIDclustering_factor3.3set_index_statsclstfct
exec dbms_stats.set_index_stats (‘DEMO’, # ‘IND_TAB_CACHED_1_ID’, # clstfct=>100 # ); dbms_stats.lock_table_statsdbms_stats/* */Clustering Factor
相关推荐: 在oracle,mysql,sqlserver中,对要求取表的行数的语法格式
在oracle中如果我们要求取表的前几行,用关键字rownum 例:select * from student where rownum在mysql中,用关键字limit 例:select * from student limit 10 得出的结果是取出前10…
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。