Updating geodatabase statistics using DB2 commands

You can update statistics using the Analyze command in ArcGIS Desktop. See Updating statistics on a geodatabase using Analyze.

However, if you want to use database management system (DBMS) tools, DB2 offers multiple ways to update statistics, such as the db2look tool and the RUNSTATS statement. See the DB2 Information Center for information.

This topic shows an example of using the RUNSTATS statement to update the statistics on a particular table and every table in a designated schema.

Steps:
  1. Update statistics on either an individual table or all tables in a specified schema. Execute the RUNSTATS command to update statistics on a specific table. Substitute the name of the table for <table_name> in the following statement:
    • To update statistics on a specific table, execute the RUNSTATS command. Substitute the name of the table for <table_name> in the following statement:
      RUNSTATS ON TABLE <table_name> WITH DISTRIBUTION AND DETAILED INDEXES ALL
    • To update the statistics for every table in a designated schema, use the UPDATE STATISTICS command. Substitute the name of the schema for <schema_name> in the following statement:
      db2 REORGCHK UPDATE STATISTICS ON SCHEMA <schema_name>

Related Topics


11/18/2013