**************************************** * ************************************ Operations on the production database sys User: exec dbms_stats.create_stat_table ('gc ', 'stat _ gc_0825'); Exec dbms_stats.export_schema_stats ('gc ', 'stat _ gc_0825 '); **************************************** *********************************** command: database statistical information backup and recovery (only for sys users) exec dbms_stats.create_stat_table ('sys ', 'stat _ 1'); Exec dbms_stats.export_database_stats ('stat _ 1 '); exec dbms_stats.import_database_stats ('stat _ 1'); the statistical information of the solution is backed up and restored (only under the user of the solution owner) exec dbms_stats.create_stat_table ('nibe ', 'stat _ 2 '); exec dbms_stats.export_schema_stats ('gc ', 'gc _ stat'); Exec dbms_stats.import_schema_stats ('gc', 'stat _ GC '); statistical backup and recovery of tables (only under the user of the table owner) exec dbms_stats.create_stat_table ('nibe ', 'stat _ 3'); Exec dbms_stats.export_table_stats ('nibe ', 't_hd_room_group_type ', null, 'stat _ 3'); Exec dbms_stats.import_table_stats ('nibe', 't_hd_room_group_type ', null, 'stat _ 3'); experiment: train of Thought: first export the database statistics, then delete the table statistics, and then import the statistics, check whether the table has statistical information. SQL> conn nibe/nibe @ orclconnected to Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 connected as nibe SQL> Create Table ABC as select * From t_c_customer; table createdsql> select table_name, last_analyzed from user_tables where table_name = 'abc'; table_name last_analyzed tables ----------- abc SQL> exec dbms_stats.gather_table_stats ('nibe ', 'abc '); PL/SQL procedure into completedsql> select table_name, last_analyzed from user_tables where table_name = 'abc'; table_name last_analyzed tables ------------- ABC 2011-6-15 16: SQL> conn sys/Oracle @ orcl as sysdba; connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 connected as syssql> exec dbms_stats.create_stat_table ('sys ', 'stats _ tab '); PL/SQL procedure successfully completedsql> exec dbms_stats.export_database_stats ('stats _ tab'); PL/SQL procedure successfully completed SQL> select count (*) from stats_tab; count (*) ---------- 295639 SQL> conn nibe/nibe @ orcl; connected to Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 connected as nibe SQL> exec dbms_stats.delete_table_stats ('nibe ', 'abc '); PL/SQL procedure successfully completedsql> select table_name, last_analyzed from user_tables where table_name = 'abc'; table_name last_analyzed tables ------------- abc SQL> conn sys/Oracle @ orcl as sysdba; connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 connected as sys SQL> exec tables ('stats _ tab'); PL/SQL procedure successfully completedsql> conn nibe/nibe @ orcl; connected to Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 connected as nibe SQL> select table_name, last_analyzed from user_tables where table_name = 'abc'; table_name last_analyzed tables ------------- ABC 2011-6-15 17: