Blog
DB2utor

Categories

April 20, 2010

How to Reset Real-Time Statistics

Last week I discussed the real-time statistics tables, where to find them and what information is stored in them.

The real-time stats, once you've located them, can be very useful. For instance, you can track the number of operations executed after you run a utility. Just reset the counters to establish a base value, and then run the appropriate utility: REORG, RUNSTATS, LOAD, REPLACE, REBUILD INDEX or COPY.

Recently I wanted to track the activity that occurred following a table and index space reorganization. So I reset the REORG counters and ran the REORG utility on a table space. Then I reorganized the table space and performed a few DML statements, deleting one row and inserting nine rows into the table stored in this table space. When I queried  SYSIBM.SYSTABLESPACESTATS, I found that these columns had been updated (click the following link to view the table I created: Download Db2utor table 4.20.10)

Hopefully this example helps you better understand not only how to reset the real-time statistics tables columns, but how the resulting information you collect can help you manage database objects.

To learn more about how DB2 utilities impact real-time stats, see this document in the IBM z/OS Solutions Information Center.

If you've used the information found in the real-time statistics tables to help you do your job as a DBA, please share your experiences in Comments.