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
decimalandnumerican 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
maxtypes. -
For
charandncharthe storage size was 2 bytes plus the size the column was defined as. -
For
varcharandnvarcharthe storage size was 2 bytes plus the size of the data stored. -
For the
varmaxdata types the number of bytes that were pre-pended varied dependent on the data size.
Read the whole thing.