Guidelines for Managing IBM DB2 Fragmentation
This topic is part of Configuring an IBM DB2 Database for Siebel CRM.
No strict guidelines can be offered as to which tables and indexes might be fragmented, because of the variety in application and customer operation variables at any given customer site. However, DBAs must pay attention to the status of large or heavily used tables, because fragmentation of these tables can affect performance significantly. For a list of these Siebel tables, see Siebel Deployment Planning Guide.
Use the following strategy to manage table fragmentation:
-
Reorganize any tables, as needed, by running
REORG TABLE
. For details on how to reorganize tables or indexes, see 477378.1 (Article ID) on My Oracle Support. This document was previously published as Siebel FAQ 2072.After reorganizing tables, update statistics by using the
runstats
utility on any reorganized tables with the following minimum parameters:runstats on table tablename with distribution and detailed indexes all shrlevel change
You might add other parameters as required, but use the shrlevel change parameter to allow concurrent access to your tables while
runstats
executes.Caution: Therunstats
utility overwrites statistics loaded by Siebel CRM. If you userunstats
, then always execute loadstats.sql afterwards, by using either the DB2 command line processor orodbcsql
. Otherwise, valuable statistics will be lost.To run loadstats.sql by using
odbcsql
, use the following command:odbcsql /s DATASOURCE_NAME /u username /p password /v separator siebel_root/dbsrvr/db2udb/loadstats.sql TABLEOWNER_NAME