IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

partitioning scheme


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Thu Sep 28, 2006 12:53 am
Reply with quote

if the table is using partisioned table space. if there are 3 parts.

how to know that what type of data is stored in part1, part2 & part3. i mean the schema/condition to store in a particular part.
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Thu Sep 28, 2006 2:02 am
Reply with quote

Data is stored by partioning key (data seperation key), you can query SYSIBM.SYSTABLEPART table to view partioning key.

Example:
Code:

SELECT PARTITION, LIMITKEY               
FROM SYSIBM.SYSINDEXPART                 
WHERE IXNAME = 'give clustering index'           
ORDER BY PARTITION;                     



LIMITKEY is max value partition will have for example if result is:

Code:

PARTITION  LIMITKEY 
---------  ----------
        1  00340330
        2  01000000 
        3  01664166



Partition 1 is anything less than 00340330
Partition 2 will have values Greater than 00340330 and Less than equal to 01000000 and so on.
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Thu Sep 28, 2006 2:21 am
Reply with quote

Correction! Partition 1 is anything less than equal to 00340330
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Fri Sep 29, 2006 1:02 am
Reply with quote

Thank you.

but i am getting junk values in limit key column

index is a date filed.

[/img]
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Fri Sep 29, 2006 1:22 am
Reply with quote

Probably index name is not correct, you can find clustering index name by using following:

Code:

SELECT NAME "IXNAME",  TBNAME, CLUSTERING
FROM SYSIBM.SYSINDEXES           
WHERE TBNAME = 'table name'         
AND   CLUSTERING = 'Y'           

Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Fri Sep 29, 2006 6:59 pm
Reply with quote

Thank you.

i got the limit key from systablepart. it is showing normally like 2001-01-01. but in indexpart is is showing junk values. this because the field is date field. it may encrypt and keep in index.

thanks for your help.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts partitioning row-num and aggregation ... DB2 0
No new posts base+displacement addressing scheme PL/I & Assembler 3
No new posts Deleting and Inserting an IMS Segment... IMS DB/DC 8
No new posts Partitioning - table based vs index b... DB2 1
No new posts Table partitioning DB2 11
Search our Forums:

Back to Top