Conceptual
Login

Lower the Random Page Cost on SSDs So Index Scans Stop Looking Expensive

The planner compares plans using made-up cost units, and its default says a random page read costs four times a sequential one — a ratio taken from spinning disks. On SSDs and cloud volumes the real gap is far smaller, so the default quietly biases the planner towards sequential scans and away from correct index plans. Setting random_page_cost to around 1.1, alongside an effective_cache_size that reflects real memory, is the one cost setting most production databases should change.

Questions this Concept answers

  • Why does leaving `random_page_cost` at 4.0 on SSD storage bias plan choice?