Implementing Siebel eBusiness Applications on DB2 UDB for OS/390 and z/OS > Maintenance Considerations for zSeries >

Updating Statistics


The DBA should update statistics on table spaces that contain EIM interface tables and base tables (including table spaces that contain extension tables and repository tables) when there has been a change of 20 percent or more in the row distribution. It is usually not necessary to update statistics on all of the table spaces, only on those containing tables that have changed.

Execution of the rstat390 utility from midtier executes RUNSTATS on the DB2 host. The rstat390 script is located within the binary subdirectory of the SIEBSRVR_ROOT directory. For rstat390 help, use option /h.

NOTE:  As far as possible, you should update statistics only for table spaces that contain changed tables, not for all table spaces, to save time and prevent locking problems.

CAUTION:  Never use RUNSTATS to update statistics for table spaces for S_DOCK_INIT_ITEM, S_DOCK_INITM%%, S_ESCL_LOG, S_CTLG_CAT, and S_OPTY. If you do so in error, run loadstat.sql afterwards.

You should update statistics only when there is little activity on the system, such as after midnight. If you run this utility while users are accessing and updating the Siebel Database, lock contention can occur. When this happens, an error message is generated, for example:

ODBC error S1000 in SQLExecDirect: [IBM][CLI Driver][DB2/6000] SQL2310N The utility could not generate statistics. Error "-911" was returned.

This does not harm your database, but the RUNSTATS job will have to be rerun for any table for which this type of error was generated, because statistics were not updated for that table.

You can execute RUNSTATS on an active system if you specify shrlevel change as an option. This allows concurrent access while the RUNSTATS utility executes.

You should execute RUNSTATS and then loadstat.sql following reorganization of any fragmented table spaces and indexes. For more information on this topic, see Reorganizing Table Spaces, Partitions, and Indexes.

You can also execute RUNSTATS directly from the DB2 host.

CAUTION:  Because the rstat390 and RUNTSTATS utilities can overwrite statistics loaded by Siebel applications, you should always execute loadstat.sql after executing rstat390. Otherwise, valuable statistics might be lost.


 Implementing Siebel eBusiness Applications on DB2 UDB for OS/390 and z/OS 
 Published: 18 April 2003