Automatic update of nickname statistics
Automatic statistics collection is a feature that collects up-to-date table and nickname statistics. This feature is enabled by default.
Before you begin
Before you begin
For automatic statistics collection to run against a data source, ensure that there is a user mapping defined for the instance owner to connect to the data source.
About this task
About this task
Automatic statistics collection is part of the automated table maintenance feature that determines when database statistics need to be updated. For nicknames, automatic statistics collection uses the catalog-based method of the nickname statistics (NNSTAT) stored procedure. The catalog-based method retrieves nickname statistics from catalog information at the remote site.
You can customize which table and nicknames are considered by automatic statistics collection. For example, you can customize which tables are considered by the automatic statistics collection feature and specifically include or exclude all nicknames, or nicknames on specific servers.
Automatic statistics collection is controlled through a maintenance policy. The same policy is used for automatic RUNSTATS and for statistics on nicknames. Sample files and examples are available that you can customize to create or update a policy.
If you do not want nickname statistics automatically collected, you can disable the automatic statistics collection feature or specify a policy to replace the default policy.
Procedure
To change the default behavior of automatic statistics collection for table and nicknames:
Procedure
- Optional:
Create a policy for automatic table RUNSTATS
operations.
Use the system stored procedures SYSPROC.AUTOMAINT_SET_POLICY and SYSPROC.AUTOMAINT_SET_POLICYFILE.
- Optional:
Collect automated maintenance policy information
about automatic table RUNSTATS operations.
Use the system stored procedures SYSPROC.AUTOMAINT_GET_POLICY and SYSPROC.AUTOMAINT_GET_POLICYFILE.
- Optional: Set the value of the AUTO_MAINT, AUTO_TBL_MAINT, and AUTO_RUNSTATS configuration parameters to OFF to disable automatic statistics collection.