Row-Overflow and LOB: When a Row Leaves the Page
This post is part of the series. The contents page lists every part in order. A data page is 8 KB, and a single row is capped at 8,060 bytes of in-row data.[1] So what…
How SQL Server Packs BIT Columns Into a Single Byte
This post is part of the series. The contents page lists every part in order. A common worry about bit columns is that a table full of yes/no flags will waste a byte on every…
The NULL Bitmap: How SQL Server Records Nullability
Every SQL Server data row carries a NULL bitmap, even a table with no nullable columns. Find it on the page, watch the bits flip as columns go NULL, and see what it actually costs.
How SQL Server Stores MONEY and SMALLMONEY, and the Rounding Trap
money and smallmoney are just integers scaled by 10000. The real page bytes, why the ranges are what they are, and the four-decimal truncation trap that bites calculations.
How SQL Server Stores DECIMAL and NUMERIC, Down to the Bytes
decimal and numeric store a sign byte plus a little-endian integer scaled by the column scale. Why precision buys storage in tiers, and why an oversized decimal is not free.
How SQL Server Stores a GUID, and Why Random Ones Fragment
A uniqueidentifier is 16 bytes with a peculiar sort order. Why random GUIDs fragment as a clustering key, and how NEWSEQUENTIALID and design fix it.