DB2 LUW: Table size

We can use below query to find out object’s physical size:

Query to give table size for T1 table in DB2INST1 schema:
db2 => select data_object_p_size, available from table(sysproc.admin_get_tab_info_v97(‘DB2INST1’, ‘T1’)) AS T

——————– ———
384                                            Y

1 record(s) selected.

Physical size meaning – Amount of disk space physically allocated for the table in Kilobytes.

The space reported by (DATA_OBJECT_P_SIZE) represents the physical size of the base table only. Space consumed by LOB data, Long Data, Indexes and XML objects are reported by other columns such as INDEX_OBJECT_P_SIZE, LONG_OBJECT_P_SIZE, XML_OBJECT_P_SIZE.

AVAILABLE: This columns specifies the state of the table.
N: Table is unavailable. If the table is unavailable, all other output columns relating to the size and state will be NULL.
Y: table is available.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: