PostgreSQL counts pages, not rows, in index planning

hackernoon.com10 min read

The author explains that PostgreSQL often bypasses indexes and uses sequential scans because the query planner prices plans based on 8 KB page reads rather than individual rows. Through tests on a 30,000-row table and a 5-million-row table, the author demonstrates how physical data distribution and selectivity dictate whether an index improves query performance. Open article →