How SQL Server Stores Data: Series Contents

How SQL Server lays out each data type on a data page, down to the bytes.

A woman scientist examines a giant open page of small compartments through a magnifying glass that enlarges a row of gold blocks.

Each post decodes real pages: date and time types, strings and UTF-8, GUIDs, DECIMAL and MONEY, the NULL bitmap, BIT packing, row-overflow and LOB data, forwarded records, and what ROW and PAGE compression do to the record. The last entry is a follow-up that proves the forwarded record back-pointer at the byte level.

  1. How SQL Server Stores a DATETIME, Down to the Bytes
  2. How SQL Server Stores DATETIME2, DATE, and TIME
  3. Seeing Exactly Where SQL Server Stores Each Column
  4. How SQL Server Stores Strings: varchar, nvarchar, and What UTF-8 Changed
  5. How SQL Server Stores a GUID, and Why Random Ones Fragment
  6. How SQL Server Stores DECIMAL and NUMERIC, Down to the Bytes
  7. How SQL Server Stores MONEY and SMALLMONEY, and the Rounding Trap
  8. The NULL Bitmap: How SQL Server Records Nullability
  9. How SQL Server Packs BIT Columns Into a Single Byte
  10. Row-Overflow and LOB: When a Row Leaves the Page
  11. Forwarded Records: What an UPDATE Can Do to a Heap
  12. What ROW and PAGE Compression Do to the Record
  13. Forwarded Records: the Back-Pointer and the Trip Home

Questions or corrections are welcome on Bluesky or LinkedIn. See all series on this blog.