Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)


By Amit Jethva,

The code in this procedure takes standard formula’s given by Microsoft and calculates approximate size of a table as per the fields  & indexs on that table. The procdure can be quickly be used in a loop to work for entire database.

Refer to article

for the actual document containing the formula’s used.

There are 2 major assumptions made
1. All The VARIABLE LENGTH columns will be completely filled. (you can change it easily)
2. FillFactor for all indexes in tables are same.

declare  @objectid int, @num_rows float , @fill_factor  smallint
select @objectid = object_id('authors'), @num_rows = 2000 , @fill_factor = 90
exec gettablesize ( @objectid ,@num_rows ,@fill_factor  )

Row Size , Data Size in KB, Clustered Index Size in KB,NonClustered Index Size in KB and total Size in KB

Total article views: 2796 | Views in the last 30 days: 5
Related Articles

Indexes fill factor impact on the fragmentation

This is a short post that is considering the indexes fill factor impact on the fragmentation. Analys...


Default Index Fill Factor

System default of 0 fill factor


Fill factors, index fragmentation and indexing strategy

Do I need to specify a fill factor for a specific scenario?


Fill Factor clarification

Fill Factor clarification


Rebuilt clustered index with new fill factor

new filll factor is not reflected in avg_page_space_used_in_percent