Space required for partitioned and nonsegmented table spaces
The following table lists these notations:
Notations used to calculate space for a nonsegmented partitioned table space
Notation | Description |
---|---|
n | Number of rows in the tablepart |
k | Average row length in tablepart |
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 | The operation of selecting the lowest integer value |
Total data pages
The formulas for total data pages in are approximations.
Total data pages
Value | Formula |
---|---|
Usable space per page | FLOOR (s * ((m * 1024) - 22 - 20)) |
Rows per page | MIN (j, FLOOR (usable space per page / (k + 8))), or 0 if n = 0 or k = 0 |
Total data pages | CEILING (n / rows per page) |
Total number of pages
The formulas for total number of pages in the following table are approximations.
Total number of pages
Value | Formula |
---|---|
Dictionary pages | If compressed:
If not compressed: 0 0 if n = 0 |
Free pages | FLOOR (total data pages / f), or 0 if f = 0 |
Space map pages | CEILING ((1 + total data + free pages + dictionary pages) / (ps - 1)) |
Total tablepart pages | 1 + total data pages + dictionary pages + free pages + space map pages |
Total tablepart space in KB | Total tablepart pages * 4 This value is rounded to the allocation unit. |
Total table space pages | The sum of the tablepart pages for each partition |
Total table space space in KB | The sum of the tablepart space of all partitions |