SQL Server (T-SQL) find average size of a row

We have one table with about 120 columns in it. I was just curious what the average row size was, and found this slick solution:

Use DBCC to find the “Average Size of a Row”

Syntax:

dbcc showcontig (‘your_table_name‘) with tableresults

My tablename=’Transaction’, so substitute your tablename there.

Example:

dbcc showcontig (‘Transaction’) with tableresults


average row size

Enlarged:

average row size

Useful columns in the result are: AverageRecordSize, MinimumRecordSize, MaximumRecordSize

Uncategorized  

Leave a Reply