How RUNSTATS affects real-time statistics
When the RUNSTATS job starts, Db2 externalizes all in-memory statistics to the real-time statistics tables.
Only RUNSTATS UPDATE ALL affects the real-time statistics.
The table below shows how running RUNSTATS UPDATE ALL on a table space or table space partition affects the SYSIBM.SYSTABLESPACESTATS catalog table statistics.
| Column name | During UTILINIT phase | After RUNSTATS phase |
|---|---|---|
| NPAGES | Actual value1 | Actual value3 |
| STATSLASTTIME | Current timestamp1 | Timestamp of the start of RUNSTATS phase |
| STATSINSERTS | Actual value1 | Actual value2 |
| STATSDELETES | Actual value1 | Actual value2 |
| STATSUPDATES | Actual value1 | Actual value2 |
| STATSMASSDELETE | Actual value1 | Actual value2 |
| TOTALROWS | Actual value1 | Actual value3 |
| DATASIZE | Actual value1 | Actual value3 |
The table below shows how running RUNSTATS UPDATE ALL on an index affects the SYSINDEXSPACESTATS statistics.
| Column name | During UTILINIT phase | After RUNSTATS phase |
|---|---|---|
| NLEVELS | Actual value1 | Actual value3 |
| NLEAF | Actual value1 | Actual value3 |
| REORGPSEUDODELETES | Actual value1 | Actual value3 |
| REORGLEAFNEAR | Actual value1 | Actual value3 |
| REORGLEAFFAR | Actual value1 | Actual value3 |
| STATSINSERTS | Actual value1 | Actual value2 |
| STATSDELETES | Actual value1 | Actual value2 |
| STATSMASSDELETE | Actual value1 | Actual value2 |
| TOTALENTRIES | Actual value1 | Actual value3 |
Notes for the preceding tables
- Db2 externalizes the current in-memory values.
- This value is 0 for SHRLEVEL REFERENCE, or the actual value for SHRLEVEL CHANGE.
- The value is updated only when SHRLEVEL REFERENCE without sampling is specified.