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

how to identify the records in a particular partition


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

New User


Joined: 24 Jan 2007
Posts: 89
Location: USA

PostPosted: Thu Jun 26, 2008 11:45 am
Reply with quote

Hi,

We are having a DB2 table with 64 partitions, i want to know the number of records in each partition, could any body help me how to write a
query to identify the number of records in each partition?


thanks,
Nagendran.R
Back to top
View user's profile Send private message
plkanth_526

New User


Joined: 01 Jun 2008
Posts: 7
Location: Bangalore

PostPosted: Thu Jun 26, 2008 2:18 pm
Reply with quote

You can get the information from RTS tables.Please use the below query to get the number of rows present partition wise.

SELECT TOTALROWS
FROM "SYSIBM".TABLESPACESTATS
WHERE
DBNAME = 'xxxx'
NAME = 'xxxx '
PARTITION = xx with ur;
Back to top
View user's profile Send private message
am_ne

New User


Joined: 24 Mar 2007
Posts: 25
Location: Bangalore

PostPosted: Mon Jun 30, 2008 6:17 pm
Reply with quote

Hi,

If RTS tables are not enabled then you have to know the partitioning logic.

The partitioning logic of the table based on values of one/multiple column.
Once you know the partitioning column name and the maximum values for your partitions, you can write the query easily.

Thanks,
Amit
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts DROP & ALTER PARTITION-PBR DB2 0
Search our Forums:

Back to Top