If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Regarding Tables info

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-11, 08:37
bala1123 bala1123 is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
Regarding Tables info

How to Calculate the following

1. Collect the details of TOP Ten Tables based upon the Size.

2. Collect the details of TOP Ten Tables based upon the Row Count.

3. Collect the details of TOP Ten Tables based upon the Recent Usage.

4. Collect the details of TOP Ten Tables based upon the Not Used Recently.
Reply With Quote
  #2 (permalink)  
Old 04-06-11, 08:39
bala1123 bala1123 is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
reply

Whether the data is available from db2pd or event monitor or snapshot tool
Reply With Quote
  #3 (permalink)  
Old 04-06-11, 10:00
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
1 and 2 is available in sysstat.tables - based on last runstats

what do you mean by 'top 10 based on recent usage' ? is the the most recent accessed tables ?
If using 9.7 see if lastused column is what you are after. note, last used column is not current but is based on a recent update by db2.

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #4 (permalink)  
Old 04-06-11, 16:50
bala1123 bala1123 is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
Thanks for Ur info.. Point 3 and 4 are recently used tables and unused tables...

Since i am little new to DB2..May i Get the procedure to get the data for all points???
Reply With Quote
  #5 (permalink)  
Old 04-06-11, 16:52
bala1123 bala1123 is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
In Our Database , they are nearly 20,000 tables are there at present. How to get top 10 tables and row count for tat tables???
Reply With Quote
  #6 (permalink)  
Old 04-06-11, 20:31
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
OK, let me repeat

1 and 2 is available in sysstat.tables , card column. This column is updated by the runstats command and therefore this value is correct at the time of collecting stats(runstats command)

3 and 4 - if using 9.7, it is available in lastused column of syscat.tables.This time specified in the column is not guaranteed to be correct - the update to the column occurs later and not immediately following the event.If using earlier versions of db2, afaik, there is no place where last used is stored.

I hope I have provided you with enough information to help you find the information you want.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #7 (permalink)  
Old 04-07-11, 15:02
bala1123 bala1123 is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
Thanks a lot dude....


I got all data with ur help........
Reply With Quote
  #8 (permalink)  
Old 04-07-11, 15:14
bala1123 bala1123 is offline
Registered User
 
Join Date: Sep 2010
Posts: 6
Hi Sathyaram,

Can u help me in tis,

1. Collect the details of Agent ID’s by Top 10 CPU Usage
2. Collect the Statements executed by those Agent ID’s
3. Collect the details of Top 10 Tablespace Containers based on Highest Read time.



Thanks in advance

Bala
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On