Database & SQL
Index Selectivity Estimator
Enter table row count, distinct values, and query selectivity to compute column selectivity, index benefit likelihood, and composite index column ordering recommendation.
No data is transmitted โ everything runs locallyTool
About this tool
Index Selectivity Estimator
The Index Selectivity Estimator computes column selectivity, index benefit probability, and composite index ordering recommendation from row count and distinct value statistics.
โข Determine whether a column has sufficient selectivity to justify an index
โข Check column order for a composite index โ most selective first
โข Understand why PostgreSQL ignores an index on a low-selectivity boolean column
โข Calculate selectivity for an existing column from pg_stats data
Affiliate disclosure
Developer-friendly cloud infrastructure. DigitalOcean provides cloud compute, networking, and managed databases with predictable pricing.
Host databases on DigitalOcean
External site ยท Independent provider ยท We may receive a commission ยท Not a recommendation
FAQ
What does this tool tell you?
The Index Selectivity Estimator computes column selectivity, index benefit probability, and composite index ordering recommendation from row count and distinct value statistics.
What affects the result most?
Selectivity = distinct_values / total_rows โ high selectivity (close to 1) = good index candidate. Index benefit threshold: PostgreSQL uses index when selectivity < ~10-15% of rows. Boolean index antipattern: boolean column has selectivity 0.5 โ index rarely beneficial.
How should I use the result?
The calculation is deterministic โ the same inputs always produce the same output โ so the most useful workflow is to vary one input at a time and see which factor moves the result most. That tells you where to focus your attention before committing to a decision.
Related tools