查看表的情况,看是否要进行手工统计信息收集:
SQL>select to_char(LAST_ANALYZED,'yyyy-mm-dd hh24:mi:ss') from DBA_TAB_STATISTICS where OWNER = '用户' and TABLE_NAME = '表名';
SQL>select * from dba_tab_modifications where table_name='表名' and TABLE_OWNER='用户';
SQL>SELECT s.table_name,s.num_rows,s.last_analyzed FROM dba_tables s where s.owner='用户' and s.table_name='表名' ;
进行手工统计信息收集:
SQL>exec DBMS_STATS.gather_table_stats('用户', '表名', cascade=>TRUE);
PL/SQL procedure successfully completed.
exec DBMS_STATS.gather_table_stats('WMWHSE9','CodeList',cascade=>TRUE);
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22996654/viewspace-2149420/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22996654/viewspace-2149420/