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.

Calculations run locally in your browser

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

Continue with Utility Matrix tools for the next decision in this workflow.
Browse tools โ†’
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.
Managed PostgreSQL hosting. Railway provides a hosted PostgreSQL option for teams that want a managed database alongside application deployment.
View Railway PostgreSQL options โ†’
External site ยท Independent provider ยท We may receive a commission ยท Not a recommendation