tags:

views:

480

answers:

2

In SQL Server, how do you determine the (average or expected) number of rows per page?

I know know how to determine the average and max row size, but I don't know how that relates to actual rows/page.

A: 

Pages are 8K in size including a 96byte header. So if you know the row size, you could make an estimate of how many rows would fit onto the data portion of a page.

robsymonds
Which row size should I used? The maximum or the average?
Jonathan Allen
Tough to say unless we know what you are trying to use this for specifically...
robsymonds
+2  A: 

8060 bytes per page, 8 pages per extent...remember that if you row is 4040 bytes then you can only fit one row on the page

DBCC SHOWCONTIG will give you how many pages your table is using

SQLMenace