SQL> drop table test purge;
Table dropped.
SQL> create table test as select * from dba_objects;
Table created.
SQL> select owner, table_name name, object_type, stale_stats, last_analyzed
from dba_tab_statistics
where table_name in ('TEST')
and owner = 'TEST'
and (stale_stats = 'YES' or last_analyzed is null); 2 3 4 5
OWNER NAME OBJECT_TYPE STA LAST_ANAL
------------------------------ ------------------------------ ------------ --- ---------
TEST TEST TABLE
开始搜集统计信息:
SQL> select owner, table_name name, object_type, stale_stats, last_analyzed
from dba_tab_statistics
where table_name in ('TEST')
and owner = 'TEST'
and (stale_stats = 'YES' or last_analyzed is null); 2 3 4 5
OWNER NAME OBJECT_TYPE STA LAST_ANAL
------------------------------ ------------------------------ -----------
查看统计信息是否过期
最新推荐文章于 2023-04-17 17:24:22 发布