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 locally

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

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
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.
Database credential management. 1Password Teams for database teams managing connection strings, replication credentials, and DBA access keys.
View DB credential management โ†’
External site ยท Independent provider ยท We may receive a commission ยท Not a recommendation