oracle 11g调优常用语句

1.查询表的基数及选择性

select a.column_name,
       b.num_rows,
       a.num_distinct cardinality,
       round( a.num_distinct/b.num_rows*100,2) selectivity,
       a.histogram,
       a.num_buckets
from dba_tab_col_statistics a,dba_tables b
where a.owner=b.owner
and a.table_name=b.table_name
and a.owner='SCOTT'
and a.table_name='T1';

posted @ 2020-07-20 11:14  orcl  阅读(129)  评论(0编辑  收藏  举报