Hierarchy
⤷ BC-DB-DB2 (Application Component) DB2 for z/OS
⤷ STU2 (Package) CCMS for DB2 for OS/390
Basic Data
Data Element | DB2RTSTBSIZE |
Short Description | Real Time Statistics: Table size = TOTALENTRIES*AvgRowLen KB |
Data Type
Category of Dictionary Type | D | Domain |
Type of Object Referenced | No Information | |
Domain / Name of Reference Type | FLTP | |
Data Type | FLTP | Floating point number, accurate to 8 bytes |
Length | 16 | |
Decimal Places | 16 | |
Output Length | 22 | |
Value Table |
Further Characteristics
Search Help: Name | ||
Search Help: Parameters | ||
Parameter ID | ||
Default Component name | ||
Change document | ||
No Input History | ||
Basic direction is set to LTR | ||
No BIDI Filtering |
Field Label
Length | Field Label | |
Short | 10 | TB Size KB |
Medium | 15 | Table Size KB |
Long | 21 | RTS: Table size in KB |
Heading | 47 | RTS: Table size = TOTALENTRIES*AvgRowLen in KB |
Documentation
Definition
The size of the table is calculated by Number of Rows * Average Row Length, where:
Number of Rows =
For single-table-tablespaces: The value of column TOTALROWS of table SYSIBM.TABLESPACESTATS for the tablespace the table is residing in.
For multi-table-tablespaces: The value of column TOTALENTRIES of table SYSIBM.INDEXSPACESTATS for the primary key of the table.
Average Row Length = The value of column AVGROWLEN of table SYSIBM.SYSTABLES for the table in question. It is calculated by RUNSTATS utility and thus is -1 if RUNSTATS has never been running on the table.
Since Real Time Statistics quite accurately reflect the number of rows, this approximation is sufficiently accurate. However, this is not an absolutely correct number. This is unavoidable since DB2 uses table spaces as a unit of physical representation, not tables. Thus, only space values for table spaces are tracked in the DB2 catalog.
There are many reasons why this number could be inaccurate. The most prominent reason is inaccuracy of the value Average Row Length, which can be attributed to two factors:
The RUNSTATS utility computes the value of column AVGROWLEN of table SYSIBM.SYSTABLES at runtime. If there have been inserts/deletes/updates into the table in the meantime, the average row length may have considerably changed.
Column AVGROWLEN of table SYSIBM.SYSTABLES is average value for all tables in a common table space. The true average row length of the individual tables may vary considerably.
The size is set to 0 if statistics have not been gathered and there is not sufficient data available in Real-Time Statistics or if the object is a view, an alias or a temporary table.
History
Last changed by/on | SAP | 20070813 |
SAP Release Created in | 700 |