听了猫大师的课,对Oracle CBO又加深了一步理解:
单表选择率:
selectivity=1/ndv*a4nulls
ocard来自dba_tables.num_rows
ndv 来自dba_tab_col_statistics中的num_distinct where 条件为 owner=‘‘ AND table_name=‘‘ and column_name=‘‘
a4nulls 来自dba_tab_col_statistics中的num_nulls where 条件为 owner=‘‘ AND table_name=‘‘ and column_name=‘‘Oracle 单表选择率,布布扣,bubuko.com
Oracle 单表选择率
原文:http://blog.csdn.net/msdnchina/article/details/38427363