Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •