Space required for universal table spaces
This topic describes the notations in the calculations for universal table spaces.
The following table lists the notations used to calculate space for universal table spaces.
Notations used to calculate space for universal table spaces.
Notation | Description |
---|---|
n | Number of rows in the table |
k | Average row length for the table |
p | PCTFREE |
f | FREEPAGE |
m | Page size in KB (4, 8, 16, or 32) |
j | Maximum rows per page (255 or MAXROWS) |
s | (100 - p) / 100 |
ps | Pages per space map (see Spacemap capacities) |
FLOOR | The operation of discarding the decimal portion of the real number |
CEILING | The operation of rounding a real number to the next highest integer |
MIN | Tthe operation of selecting the lowest integer value |
Total data pages and free pages for a table in a universal table space
The formulas in the following table are approximations.
Total data pages and free pages for a table
Value | Formula |
---|---|
Usable space per page | FLOOR (s * ((m * 1024) - 22)) |
Rows per page | MIN (j, FLOOR (usable space per page / (k + 8))) |
Data pages | CEILING (n / rows per page) |
Free pages | FLOOR (data pages / MIN(f, (segsize - 1))), or 0 if f = 0 |
Total data and free pages for table | FLOOR ((data pages + free pages + segsize - 1) / segsize) * segsize |
Total number of pages in a universal table space
The formulas in the following table are approximations.
Total number of pages in a universal table space
Value | Formula |
---|---|
Dictionary pages | |
Space map pages | CEILING ((total data and free pages + dictionary pages) / ps) |
Total tablepart pages | 1 + total data and free pages + dictionary pages + space map pages |
Total tablepart space (space in KB) | (BMC.DB2.SPE2110) Total table space pages * 4 This value is rounded to the allocation unit. |
Total table space pages | Sum of the tablepart pages for each partition |
Total table space (space in KB) | Sum of the tablepart space of all partitions |
Related topic