On going through the below link I understand the row size can be max 64KB. But need clarity on the below:
-
This limitation is considering all data types?
-
Is the size limitation considering the compression?
On going through the below link I understand the row size can be max 64KB. But need clarity on the below:
This limitation is considering all data types?
Is the size limitation considering the compression?
This limitation does not apply to all data types:
“Limit does not apply to variable-length strings such as VARCHAR, VARBINARY, TEXT, etc.”
And it does not consider compression.
The limit is the total size of all fixed-width fields, plus some minimum amount for each variable-width field. I think it is 12 bytes for those, to hold a pointer to the data and a NULL indicator, but I’m not 100% sure. If you need an exact figure, I can try to get it for you.
Hi Hanson, Thanks for the clarity. Yes, those exact figures will help us a lot.
If you look at our data types documentation, it tells you the size of all the types. The in-row portion includes fixed-width data, and a 4-byte nullability flag for nullable fields. Fixed width data includes all the data for fixed-width char and binary. For off-row data (variable length strings, text, blobs) the in-row portion is 8 bytes for the pointer plus 4 bytes for an optional nullability flag. The sum of those for all the columns has to be at most 64KB.