Data engineering·Files, formats and table layers
the column holds four distinct country names in eleven million rows, and the file stores small integers plus a lookup.
Dictionary encoding
Also calleddictionary compression
Storing repeated values once and referring to them by a small integer. It is why a low-cardinality string column costs almost nothing in a columnar file, and it is a compounding reason to sort data before writing it. Engines can also filter directly against the dictionary, so it makes some predicates cheap without decoding the column at all.