Documente Academic
Documente Profesional
Documente Cultură
Step to do:
Step 1: Creating the stats table to backup the existing statistics of EXAMPLE_USER
schema.
$ sqlplus testuser/******* #testuser should have dba privilege
SQL>
DBMS_STATS.create_stat_table('TESTUSER','EXAMPLE_USER_STATS_23DEC2015');
Step 2: Exporting the EXAMPLE_USER schema statistics and stored in newly created
statistics tableEXAMPLE_USER_STATS_23DEC2015
EXEC
DBMS_STATS.export_schema_stats('EXAMPLE_USER','EXAMPLE_USER_STATS_23D
EC2015',NULL,'TESTUSER');
Important Note: If the performance is bad with the new statistics then import the old stats
using below command
Importing the old EXAMPLE_USER schema statistics from the created statistics
tableEXAMPLE_USER_STATS_23DEC2015 ,
EXEC
DBMS_STATS.import_schema_stats('EXAMPLE_USER','EXAMPLE_USER_STATS_23D
EC2015',NULL,'TESTUSER');