Other / Reorg
Purpose
REORG view shows the information of table reorganization. If no tables have been reorganized, the list will be empty. This view could be used to check the progress and status of table reoriganization.
Screenshot
![image image](/dmctop-wiki/static/bc1ed9b6bc8d5a66b5cf428c9d1fda2a/3cbba/reorg.png)
Metric shown
Member
In a partitioned database environment, this is the numeric identifier for the database member. For Db2 Enterprise Server Edition and in a Db2 pureScale environment, this value is 0.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).DBPARTITIONNUM
Start
The start time of a table reorganization including a reorganization to reclaim extents from a multidimensional clustering (MDC) or insert time clustering (ITC) table.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_START
Phase start
The start time of a phase of table reorganization or reclaim reorganization.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_PHASE_START
End
The end time of a table reorganization including a reorganization to reclaim extents from a multidimensional clustering (MDC) or insert time clustering (ITC) table.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_END
Table schema
The schema of the table.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).TABSCHEMA
Table name
The name of the table.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).TABNAME
Datapartid
The identifier of the data partition for which information is returned.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).DATA_PARTITION_ID
Index schema
The schema name of the index.
Source SYSCAT.INDEXES(CURRENT_SERVER, 0).INDSCHEMA
Index name
Unqualified name of the index.
Source SYSCAT.INDEXES(CURRENT_SERVER, 0).INDNAME
Type
Table reorganize attribute settings.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_TYPE
Phase
Indicates the reorganization phase of the table.
This interface returns a text identifier based on defines in sqlmon.h and is one of:
- BUILD
- DICT_SAMPLE
- INDEX_RECREATE
- REPLACE
- SORT
- SCAN
- DRAIN
- RELEASE
- SORT+DICT_SAMPLE.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_PHASE
Pct complete
Indicate the percentage of reorganization that has been completed.
If REORG_STATUS equals ‘COMPLETED, the value is 100; Otherwise, the value is REORG_CURRENT_COUNTER / REORG_MAX_COUNTER.
Source
REORG_STATUS = SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_STATUS
REORG_CURRENT_COUNTER = SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_CURRENT_COUNTER
REORG_MAX_COUNTER = SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_MAX_COUNTER
Rows compressed
The number of rows compressed in the table during reorganization.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_ROWSCOMPRESSED
Rows rejected
The number of rows that were not compressed during reorganization due to the record length being less than or equal to the minimum record length.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_ROWSREJECTED
Status
The status of an in-place (online) table or a data partition level reorganization.
Source SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_STATUS
Completion
Indicate table reorganization success.
If REORG_END is NULL, then the value is NULL; Otherwise, the value is REORG_COMPLETION.
Source
REORG_END = SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_END
REORG_COMPLETION = SNAP_GET_TAB_REORG(CURRENT_SERVER, 0).REORG_COMPLETION