When looking at the data sent, the size of the packages and “drilling” into the TCP packets we could deduct that: :
-
Each column has an over-head of 32 bytes (at least for non nullable data)
-
The size of the column in one row is the size of the data type for numeric types.
-
For
decimal
andnumeric
an extra byte is added to each column, where this byte indicates the precision. -
Columns of alpha numeric type all had 2 bytes pre-pended to the bytes, except
max
types. -
For
char
andnchar
the storage size was 2 bytes plus the size the column was defined as. -
For
varchar
andnvarchar
the storage size was 2 bytes plus the size of the data stored. -
For the
varmax
data types the number of bytes that were pre-pended varied dependent on the data size.
Read the whole thing.