avg row size

  • Hi  all,

     

    I need to detect the avg row size of some tables  for DBCC INDEXDEFRAG purposes, and

    apply 1.2*(avg rowsize)*(nr of rows)  formula...

    Do you know of a method? I have search the Interbnet and I found no code for SQL  except  for Oracle PL/SQL

    If you have any ideas, please help

     

    Thanks

    LMT

     

  • You could try DBCC SHOWCONTIG(object_id)

    This will give you the number of pages occupied by the table, and the average page density. Knowing that each page is 8Kb, and given the number of rows in the table, you should be able to get an average number of bytes per row.

    Regards

    Rob

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply