Skip to content

Compression

Compression Info

Pages compressed with PAGE compression have a CI (Compression Info) record after the page header, holding the structures shared by the records on the page.

KeyNameDescription
00
HeaderSingle byte with flags for which structures are present - Has Anchor Record and Has Dictionary
00
Page Modification CountNumber of changes to the page since it was compressed, used to decide when the page is worth recompressing
00
SizeTotal size of the compression info structure including the dictionary. Only present when the page has a dictionary
00
LengthLength of the compression info structure up to the end of the anchor record - the dictionary starts at this offset
00
Anchor RecordA CD format record holding an anchor value per column. Records on the page store only the difference from the anchor value (column prefix compression)
00
DictionaryValues shared across the page (page dictionary compression). Records reference a dictionary entry by symbol instead of repeating the value

Dictionary

KeyNameDescription
00
Entry CountNumber of entries in the dictionary
00
Dictionary Entry Offset ArrayTwo bytes per entry giving the offset where each dictionary value ends
00
Dictionary ValueThe shared values, referenced from column descriptors as symbols