Data engineering and databases

Data column encoding size estimate calculator

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.

Your numbers

Use the units shown. Results update as you change valid inputs.

YOUR RESULT

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.

THE NUMBERS, EXPLAINED

How to use this calculator.

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.

Start with your inputs

Enter column rows (count), distinct values (count), raw value width (bytes). Keep amounts in the units shown on each field. The example is a starting point, not a recommended value.

InputExample value
Column rows (count)1000
Distinct values (count)16
Raw value width (bytes)8

A worked example

With the example inputs above, raw column size (bytes) is 8,000. Change the inputs to explore your own scenario.

All results for the example inputs above
ResultExample answer
Raw column size (bytes)8,000
Dictionary index width (bits/row)4
Dictionary encoded size (bytes)628
Bytes saved (bytes)7,372

How this is calculated

Raw column size (bytes)

Multiply rows by raw value width.

Dictionary index width (bits/row)

Use enough bits to address every distinct dictionary entry.

Dictionary encoded size (bytes)

Add raw dictionary bytes and packed indices rounded to whole bytes.

Bytes saved (bytes)

Subtract encoded size from raw size.

Symbols and units
a
Column rows (count)
b
Distinct values (count)
c
Raw value width (bytes)

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions and limits

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.

Calculations use the values you enter. Blank or invalid inputs show an error instead of silently substituting zero. Results are displayed to useful precision; calculations retain the underlying numeric precision.

Questions about this tool

What does the result tell me?

Raw column size (bytes); Dictionary index width (bits/row); Dictionary encoded size (bytes); Bytes saved (bytes). The result applies to the method and inputs described above. Check the units and assumptions before using it in a decision.

Why might another calculator differ?

Differences in units, rounding, timing or model definitions can produce different answers. Compare the input definitions and the method, rather than only the final number. For this tool: 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.

Are my inputs stored or sent to AI?

Calculations on this page happen in your browser. The separate AI question finder sends its submitted conversation to OpenAI; these calculator fields are not sent. Favourites and recent tool names are stored locally. A shared link contains the inputs you choose to include.

Further reading

Apache Parquet Encodings — Dictionary Encoding ↗

Background reading; this does not imply endorsement or independent review of SumFizz.

Review status

Software example and browser checks are recorded in our quality report. No external expert review is claimed. Created with coding assistance; calculations run as ordinary browser code.

Read the quality report →