TLDR Tech / Dev
The real cost of random I/O
Experiments show Postgres's default random_page_cost (4.0) underestimates the true cost of random I/O on SSDs, which is often closer to 25–35, causing the planner to sometimes pick inefficient index scans. However, lowering it can still make sense in real-world OLTP systems with high cache hit rates or imperfect estimates, so tuning should be based on actual workload monitoring.
Read the full story