DB2 Index and Table Statistics
DB2® uses catalog statistics to determine the most efficient access plan for a query. Out-of-date or incomplete statistics for a table or an index can slowdown query execution.
Update Table Statistics Manually
Updating of table statistics is required on a daily basis. To do this, run the following command for all the tables in Sterling B2B Integrator schema:
db2 runstats on table <table name> on key columns with distribution on key columns and sampled detailed indexes all allow read access
Index Rebuilds
Index rebuilds are also required for the Sterling B2B Integrator schema when the data in the tables change by approximately 20%. However, the rebuild must be validated by looking at the system performance as a whole. The Sterling B2B Integrator system administrator must work with the database administrator (DBA) to identify the indexes that must be rebuilt.