Worked example
Raw column size (bytes): 8,000
Inputs
- Column rows (count): 1000
- Distinct values (count): 16
- Raw value width (bytes): 8
Compares fixed-width raw storage with an ideal bit-packed dictionary index plus one raw dictionary entry per distinct value.
Use the units shown.
Multiply rows by raw value width.
Use enough bits to address every distinct dictionary entry.
Add raw dictionary bytes and packed indices rounded to whole bytes.
Subtract encoded size from raw size.
Compares fixed-width raw storage with an ideal bit-packed dictionary index plus one raw dictionary entry per distinct value. Headers, null bitmaps and codec overhead are excluded.
Apache Parquet Encodings — Dictionary Encoding ↗Raw column size (bytes): 8,000
Raw column size (bytes): 8,000