
Auto Estimate PostgreSQL Table and Index Size from EF Core Models
TL;DR: EfCore.StorageEstimator combines EF Core model metadata with explicit workload assumptions so you can estimate PostgreSQL heap, index, and graph growth before production data exists. If you use EF Core with PostgreSQL, you can usually answer schema questions like these: What tables will exist? Which columns are nullable? Which indexes are we creating? Are we using owned types, many-to-many, complex properties, or inheritance? What you usually cannot answer quickly is this: how much storage will this model consume once real tenants, projects, assets, or events start piling up? That is the gap EfCore.StorageEstimator is trying to close. It takes the parts EF Core already knows from the compiled model and combines them with the parts only you know: expected row counts, field fill rates, average payload lengths, and navigation multiplicities. The tool estimates PostgreSQL table size, index size, and how row counts grow across related entities. Here is the kind of report it produces
Continue reading on Dev.to
Opens in a new tab



