Updating statistics in a production environment
To ensure satisfactory performance, Oracle recommends that you do the following:
- Analyze all tables and indexes.
- Refresh database statistics periodically.
In a production environment, refreshing one time per day during the maintenance window is usually sufficient. However, Oracle recommends that you also refresh the database statistics if you add a large amount of data or metadata to a study.
To update the statistics, you can run the updatestats.cmd script, located in the <Installation_Directory>\bin\dbora directory. Type the following in a Command Prompt window:
sqlplus <pfdbadmin_uid>@<connect_string> @updatestats.cmd <trialUID>
When prompted, enter the password for the pfdbadmin database user.
Do not use the dbms_utility.analyze_schema procedure with the COMPUTE or the FOR TABLES option on any production servers. The recommended procedure is to analyze each table and index with the ESTIMATE option (35 percent is adequate).