STEPS TO CHECK ALL THE TABLESPACE PARTITIONED ENTRIES
1. Tables are always defined in respective tablespaces
SELECT * FROM SYSIBM.SYSTABLES
WHERE NAME= 'MSG_RCVD'
WITH UR;
The tablespace for the mentioned table is TSMPR
----------------------------------------------------------------------------------------
2. The table space is partitioned by defining index on each partition with Limit keys.
SELECT * FROM SYSIBM.SYSTABLESPACE
WHERE NAME = 'TSMPR'
WITH UR;
The partition we get from here were
NAME DBNAME PARTITIONS
------------------------ ------------------------ ----------
TSMPR PRDX1 10
-----------------------------------------------------------------------------------------
3. The index is defined for the particular table that can be found:
SELECT * FROM SYSIBM.SYSINDEXES
WHERE TBNAME = 'MSG_RCVD'
WITH UR;
From this query we get that index is clustered also indexspace.
DBNAME INDEXSPACE TBNAME CREATOR NAME
------------------------ --------------------- ----------------- ----------- ----------------
PRDX1 IXPMPR MSG_RCVD PRDX1 IXPMPR
-----------------------------------------------------------------------------------------
4. The keys on which index is declared we get from:
SELECT * FROM SYSIBM.SYSKEYS
WHERE IXNAME = 'IXPMPR'
WITH UR;
IXNAME IXCREATOR COLNAME
------------ ------------ ---------------------
IXPMPR PRDX1 MPR_CREAT_TMSTMP
IXPMPR PRDX1 MPR_PART_ID1
IXPMPR PRDX1 MPR_SEQ_NO1
IXPMPR PRDX1 MPR_TXN_ID1
-----------------------------------------------------------------------------------------
5. To determine the limits for partition:
SELECT * FROM SYSIBM.SYSINDEXPART
WHERE IXNAME = 'IXPMPR'
WITH UR;
PARTITION IXNAME IXCREATOR LIMITKEY
--------- ---------- ------------- ------------
1 IXPSPR PRDX1 AD01
2 IXPSPR PRDX1 AD02
3 IXPSPR PRDX1 AD03
4 IXPSPR PRDX1 AD04
5 IXPSPR PRDX1 AD05
6 IXPSPR PRDX1 AD06
7 IXPSPR PRDX1 AD07
8 IXPSPR PRDX1 AD08
9 IXPSPR PRDX1 AD09
10 IXPSPR PRDX1 ZZZZ
-----------------------------------------------------------------------------------------
No comments:
Post a Comment