`

Refresh statistics for all tables

 
阅读更多

 

select 'analyze table '||table_name||' delete statistics; ' from user_tables;

select 'analyze table '||table_name||' compute statistics;' from user_tables;

select 'alter index ' || index_name ||' rebuild tablespace '|| TABLESPACE_NAME ||' compute statistics;' from user_indexes WHERE INDEX_NAME not like 'SYS%';

select 'alter index '||TABLE_OWNER ||'.'||index_name||' compute statistics;' from user_indexes WHERE INDEX_NAME not like 'SYS%';

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics