1101
Chapter 48: Data Compression
48
written to an anchor row at the beginning of each page. This method is repeated for all
subsequent columns in the table.FIGURE 48-1
The sample data before page compression is enabled.ggghhggghiigggiiigggghhhhhggggii hhhhghikghikPage HeaderThe values are then updated with the prefi x (see Figure 48-2). The fi rst value, ggghh,
begins with four letters of the prefi x, so 4h is written, which saves space on the page. The
compression ratio is much better for values that include more of the prefi x — for example,
ggghii is compressed into just the number 6 because it contains six characters of the pre-
fi x with nothing remaining.FIGURE 48-2
Prefi x compression identifi es the best prefi x for each column and then stores the prefi x char-
acter count in each row instead of the prefi x characters.4h6ggghii3iii4h0hhhh6 0hhhhggggii4ghik4Page Headerc48.indd 1101c48.indd 1101 7/31/2012 10:24:09 AM7/31/2012 10:24:09 AM
http://www.it-ebooks.info