When I interview engineers about estimating database size, they get

Arpit Bhayani

Arpit Bhayani

Feb 25, 2025 • 1 min read


When I interview engineers about estimating database size, they get the table size right but wrongly assume the index is a fixed fraction - say 10% - of the data; this is a bad estimate.

Index size should never be assumed as a fixed percentage of the data because it does not depend on the data size. It depends on the indexed columns and their cardinality.

A massive table might have unindexed columns, such as a large text column, bloating its size. Hence, estimating index size based on the size of the indexed columns is a better idea, btw, it also depends on the index structure.

(indexed columns size + row identifier size) × cardinality

This is simpler and much more accurate than taking a presumed fraction.

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses