How To Export And Import Statistics In Oracle
How To Export And Import Statistics In Oracle Step 1: If you wish to save your statistics of schema or table, which you can use later during any query issue Or if you wish copy the statistics from production database to development , then this method will be helpful. Here i will take export of statistics of a table ARVIND.TEST from PROD and import into TEST DEMO: create a table to store the stats: --- ARVIND is the owner of the stats table, STAT_TEST - name of the stats table PROD> exec DBMS_STATS.CREATE_STAT_TABLE('ARVIND','STAT_TEST','SYSAUX'); PL/SQL procedure successfully completed. SQL> select owner,table_name from dba_tables where table_name='STAT_TEST'; SQL> / OWNER TABLE_NAME ------------ ------------ ARVIND STAT_TEST SQL> PROD> exec dbms_stats.export_table_stats(ownname=>'ARVIND', tabname=>'TEST', stattab=>'STAT_TEST', cascade=>true); PL/SQL procedu