I was going through some pre-defined formula for estimating size of table in SQL SERVER 2005.
Can someone please explain me constant/hardcoded numbers thats used in these formulaes.
To calculate null bitmap, its:
Null Bitmap (Null_Bitmap) = 2 + (( Num_Cols + 7) / 8 )
What is 2, 7 and 8 in above formala? Detailed explanation is highly appreciated.
Total size of variable-length columns (Variable_Data_Size) = 2 + (Num_Variable_Cols x 2) + Max_Var_Size
What is 2 in above formula. And there is "Num_Variable_Cols x 2".. What does this 2 mean?
Number of rows per page (Rows_Per_Page) = ( 8096 ) / (Row_Size + 2)
Why are we adding additional 2 in above formula? What does that mean?
To calculate fill factor:
Number of free rows per page (Free_Rows_Per_Page) = 8096 x ((100 - Fill_Factor) / 100) / (Row_Size + 2)
Here we have another 2. What does this 2 mean?
Also every page is 8KB in size and every page has header thats of 96 bytes. Question is what makes up 96 bytes
and why 96 bytes?