April 13, 2010

Where are my Real-Time Statistics Tables?

If you're new to DB2 for z/OS, you may have only heard about the real-time statistics tables. But where are they?

The real-time statistics tables were introduced with DB2 Version 8 as optional user-defined tables. The purpose of the tables is to provide a foundation for future development that will take advantage of collection statistics about DB2 objects in real-time. You can write programs that query these tables to determine when to run utilities such as REORG and COPY. Learn more about these tables in the DB2 UDB for z/OS Version 8 Administration Guide.

To set these tables up in DB2 V8, submit the job DSNTESS, which is found in the DSN810.SDSNSAMP sample library. Click the following link to see the list of objects created: Download Mfblog_coleman table.

Now, with DB2 9 new-function mode, the real-time statistics tables are part of the DB2 catalog.  However, while in conversion mode (previous known as compatibility mode), the real-time statistics tables are still in the user-defined tables. When enabling new-function mode, the job DSNTIJEN is used to move the real-time statistics data into catalog database DSNDB06 with new table names SYSIBM.SYSTABLESPACESTATS and SYSIBM.SYSINDEXSPACESTATS.

Learn more about setting up real-time statistics in the DB2 for z/OS Utility Guide.