SQL> exec dbms_stats.gather_schema_stats(ownname=>'HBHE',estimate_percent=>10,degree=>8,cascade=>true,granularity=>'ALL');
PL/SQL procedure successfully completed.
exec dbms_stats.gather_table_stats(ownname=>'HBHE',tabname =>'T1',estimate_percent =>DBMS_STATS.AUTO_SAMPLE_SIZE,method_opt => 'FOR ALL COLUMNS SIZE AUTO',cascade=>true);
exec dbms_stats.gather_table_stats(ownname=>'HBHE',tabname =>'T2',estimate_percent =>DBMS_STATS.AUTO_SAMPLE_SIZE,method_opt => 'FOR ALL COLUMNS SIZE AUTO',cascade=>true);
exec dbms_stats.gather_table_stats(ownname=>'HBHE',tabname =>'T3',estimate_percent =>DBMS_STATS.AUTO_SAMPLE_SIZE,method_opt => 'FOR ALL COLUMNS SIZE AUTO',cascade=>true);
查看表的统计信息时间
SQL> select table_name,index_name,t.blevel,t.num_rows,t.leaf_blocks,t.last_analyzed from user_indexes t where table_name in ('T1','T2','T3');
版权声明:本文为博主原创文章,未经博主允许不得转载。
oracle
- 上一篇:oracle收集SQLT
- 下一篇:Oracle Intersect运算符