December 30, 2003 at 11:57 pm
Is there a way to determine the number of rows in a page?
DBCC SHOWCONTIG tells me:
- Avg. Bytes Free per Page.....................: 114.9
Does this mean if I had rows which are 114 bytes then would add it to this page?
- Avg. Page Density (full).....................: 98.58%
Would a density of 100% be a good thing?
Cheers,
Crispin
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
December 31, 2003 at 10:17 am
It potentially cold add rows. It depends if you have many variable length columns. The # of rows is 8060 / row size (roughly). Variable length columns could change that. Only hard rule is the entire row must fit on the page (less text/image).
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
January 2, 2004 at 3:29 am
quote:
Is there a way to determine the number of rows in a page?
DBCC SHOWCONTIG (tablename) WITH TABLERESULTS
This will give you number of rows and average row size, then you can do the math. If you're looking for the number of rows in a specific page you'd have to use DBCC PAGE.
quote:
Would a density of 100% be a good thing?
Depends on how the database is used. For a read-only database it would definately be good as it would reduce the storage space needed and would return as many rows as possible per page fetched. But if the data is going to change a lot you could experience page splits, depending on how the data is stored (i.e. clustered or not, and on which data). Page splits may or may not hurt the performance of your database to various degrees,
--
Chris Hedgate @ Extralives (http://www.extralives.com/)
Contributor to Best of SQL Server Central 2002 (http://www.sqlservercentral.com/bestof/)
Articles: http://www.sqlservercentral.com/columnists/chedgate/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply