What is the point of "Average Row Size" (AVGROWSIZE) as a column if you're
just going to make it a -1 if there are any variable length fields or LOB
fields? Just what else is going to happen to cause two rows of unequal
length that you may need to compute an "average" row length?
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/db2/rbafzcatsyspstat.htm
Makes it rather tough to do anything like
SELECT SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME, SYSTEM_TABLE_MEMBER,
cast(AVGROWSIZE as dec(5,0)) as RowSize,
cast(NUMBER_DELETED_ROWS as dec(9,0)) as NbrDelRows,
Deleted_Space
FROM QSYS2.SYSPARTITIONSTAT t
, lateral(values t.avgrowsize*t.number_deleted_rows)
L1 (Deleted_Space)
ORDER BY Deleted_Space desc
Guess I'll just sort it by Number_Deleted_Rows
LIBRARY FILE
NAME NAME SYSTEM_TABLE_MEMBER ROWSIZE AVGROWSIZE
NBRDELROWS DELETED_SPACE
---------- ---------- ------------------- ------- -----------
------------ ---------------
QUSRBRM QA1ALI2 QA1ALI2 1- 1-
16,925,374 16,925,374-
QUSRBRM QA1ADI2 QA1ADI2 1- 1- 624,420
624,420-
QUSRBRM QA1ANET2 QA1ANET2 2,171 2,171 473,913
1,028,865,123
QUSRBRM QA1AOD QA1AOD 736 736 285,537
210,155,232
QUSRBRM QA1ALG QA1ALG 1- 1- 38,409
38,409-
QUSRBRM QA1AHS QA1AHS 1,190 1,190 9,758
11,612,020
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.