DB2 reorgchk

The performance of the SQL statements can be impaired after many updates, deletes, or inserts have been made. Performance can be improved by obtaining the current statistics for the data and rebinding.

Use the following DB2 command to issue runstats on all user and system tables for the database you are currently connected to:

reorgchk update statistics on table all

You should then rebind packages using the bind command.

In order to see if runstats has been done, issue the following command on DB2 CLP:

db2 -v "select tbname, nleaf, nlevels, stats_time from sysibm.sysindexes" 

If no runstats has been done, nleaf and nlevels will be filled with -1 and stats_time will have an empty entry "-". If runstats was done already, the real-time stamp when the runstats was completed will also be displayed under stats_time. If you think the time shown for the previous runstats is too old, execute runstats again.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.