QSYS2.PARTITION STATISTICS

From MidrangeWiki
Revision as of 22:36, 21 July 2016 by Starbuck5250 (talk | contribs) (initial page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

QSYS2.PARTITION_STATISTICS is a DB2 user defined function that returns information on members in a physical file.

Example use:

select *                                                           
from table(qsys2.partition_statistics('QGPL      ', 'QCLSRC    ')) x;

Parameters:

  1. Schema name padded to 10 characters
  2. Table name padded to 10 characters


As of 7.2 TR3, some of the data returned:

Statistics returned
Column name Use
TABLE_PARTITION Member name
SYSTEM_TABLE_MEMBER Member name
NUMBER_ROWS Record count
NUMBER_DELETED_ROWS Deleted record count
LAST_CHANGE_TIMESTAMP Timestamp of last change
LAST_SAVE_TIMESTAMP Timestamp of last save
LAST_RESTORE_TIMESTAMP Timestamp of last restore
LAST_USE_TIMESTAMP Timestamp of last usage
DAYS_USED_COUNT Days used
LAST_RESET_TIMESTAMP Timestamp of last usage reset
FILE_CST_TYPE File type (Source, etc)
NEXT_IDENTITY_VALUE Next IDENTITY
CREATE_TIMESTAMP Timestamp of creation
LAST_SOURCE_UPDATE_TIMESTAMP Timestamp of last source update
SOURCE_TYPE Source type (CL, CLP, etc)