Optimizer Statistics
LeasePak Documentation Suite NETSOL website
Oracle 19c Server

Oracle 19c Server

Optimizer Statistics

Automatically Gathering Optimizer Statistics

The Oracle Automatic Optimizer Statistics Collection automated maintenance task will automatically gather fresh optimizer statistics for your LeasePak databases and the Oracle data dictionary.

Oracle recommends using the Automatic Optimizer Statistics Collection automated maintenance task to gather optimizer statistics.

Automatic Optimizer Statistics Collection and other Oracle automated maintenance tasks are run during a contiguous time interval referred to as a maintenance window. Oracle by default creates seven maintenance windows, one for each day of the week. The Monday through Friday windows start at 10 pm and end at 2 am. The Saturday and Sunday windows start at 6 am and last for 20 hours. The default maintenance windows can be customized to run on a different schedule.

Information note:  The CDB (container database) and PDB's (pluggable databases) each have their own separately-configured maintenance windows.

Warning note: If the timing of the Oracle maintenance windows adversely affects the performance of LeasePak End of Period or other critical processing, customize the maintenance windows to run on a different schedule.

Manually Gathering Optimizer Statistics

It is unnecessary to manually gather optimizer statistics periodically if you are using the Oracle Automatic Optimizer Statistics Collection automated maintenance task. However, there may be occasions where optimizer statistics are required immediately and you cannot wait for the next run of the Oracle automated maintenance task. In such cases, statistics may be gathered manually by running the LeasePak Unix script named db_update_statistics:

  1. Log on the application host as the LeasePak database administrator ($NSTDBA).
  2. Run the db_update_statistics script with the -d option by entering at the Unix prompt:
    % db_update_statistics -d environment