random_page_cost in Postgres - why the default is 4.0 and should you lower it? | POSETTE 2026
Postgresql Random_page_cost Postgresql tuning Query planner Database optimization Index scan Ssd performance Postgresql configuration Cost based optimizer Database performance
PostgreSQL contributor Tomas Vondra explains the random_page_cost parameter, which controls the planner's estimate of random I/O cost relative to sequential reads. The talk explores why the default has been 4.0 since 2002, how modern SSDs have changed the I/O landscape, and provides practical guidance on whether to adjust this parameter for SSD workloads using real measurements with EXPLAIN ANALYZE.