oracle中导出统计信息到其他表的过程

oracle中导出统计信息到其他表的过程


exec dbms_stats.create_stat_table('&OWNER','MY_STATS_TAB');

exec dbms_stats.export_table_stats('&OWNER','&SOURCE_TABNAME',NULL,'MY_STATS_TAB');

exec dbms_stats.import_table_stats('&OWNER','&TARGET_TABNAME', null, 'MY_STATS_TAB');

检验:
select table_name, num_rows from dba_tables where table_name in ('&SOURCE_TABNAME' ,'&TARGET_TABNAME' );

 

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *