set echo off
set term off
set feedback off
set verify off
set trimspool on
set pagesize 0
set linesize 256
spool $ORACLE_HOME/analyze_tab.sql
select 'analyze table '||owner||'.'||table_name||' estimate statistics sample 30 percent;'
from all_tables
where owner = upper('sms3')
--and table_name in ('','')
order by owner, table_name;
spool off
set feedback on
set echo on
set term on
set verify off
@$ORACLE_HOME/analyze_tab.sql
set echo off
set term off
set feedback off
set verify off
set trimspool on
set pagesize 0
spool $ORACLE_HOME/analyze_idx.sql
select 'analyze index '||owner||'.'||index_name||' estimate statistics sample 30 percent;'
from all_indexes
where owner = upper('sms3')
--and table_name in ('DVBBUSIINSTEN','DVBDEVINSTEN','BINDICINFOEN','BINDSTBINFOEN')
order by owner, table_name, index_name;
spool off
set feedback on
set echo on
set term on
set verify off
@$ORACLE_HOME/analyze_idx.sql
阅读(590) | 评论(0) | 转发(0) |