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 > Calculating Row size in bytes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-12-07, 07:51
JDionne JDionne is offline
Registered User
 
Join Date: Aug 2002
Location: Charlotte NC
Posts: 663
Calculating Row size in bytes

Hey I have lost the formula that I had at one time to help me see how many bytes are in a row and the formula that helped me see how many rows in a page I am getting. Can anyone refresh my mem?

PS after they changed the search function on this site i cant find ANYTHING, any hints on that as well?
__________________
------------
And back to SQL Server....I always find my way home
View my Linkedin profile
Reply With Quote
  #2 (permalink)  
Old 06-12-07, 08:18
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Assuming that you runstats are current:


select t.tabschema,t.tabname,t.card/t.npages as rows_per_page, (t.card/t.npages)/ts.pagesize as avg_row_length from syscat.tables as t inner join syscat.tablespaces as ts on (t.tbspaceid = ts.tbspaceid)

This is a simple method. It does not take into account the "overhead" on each page, etc.

Andy
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