Planner tuningadvancedPro runbook

Fix random_page_cost for SSD storage

random_page_cost defaults to 4.0, a spinning-disk assumption. On SSD, random reads are nearly as cheap as sequential, lowering it to ~1.1 flips a selective query from a Bitmap Heap Scan to a straight Index Scan.

Problem

What you're actually looking at

The symptom as it shows up on a real server.

The planner weighs random vs sequential I/O using random_page_cost (default 4.0) and seq_page_cost (1.0). That 4:1 ratio reflects spinning disks. On SSD or well-cached storage random access is far cheaper, so the default makes the planner avoid index scans it should prefer.

Meridian runs on SSDs but the planner still assumes random reads are 4x sequential, so it picks a Bitmap Heap Scan on parcel_scans_rpc where a plain Index Scan would fit the hardware better.

Simple terms

The planner chooses between a random-access index scan and a straight sequential scan by comparing their costs, and by default it assumes a random read is four times as expensive as a sequential one, an assumption straight from the spinning-disk era. On SSDs random reads are almost as cheap as sequential, so that stale 4:1 ratio makes the planner shy away from index scans it should be choosing. Lowering random_page_cost to match your hardware fixes it.

ProCaptured evidence where the run produced it

Full runbook for this incident

The scenario above is free. What Pro unlocks is the fix: how to identify fix random_page_cost for ssd storage, the exact SQL to trace it, PostgreSQL 18 output for the steps we captured, the resolution path, and how to stop it recurring.
  • The full identify checklist, the exact signals that tell you it's this incident
  • Every diagnostic query; lab output is attached only to the steps we actually captured
  • The resolution path and the pitfalls that make it worse
  • Mitigation steps to stop it recurring, plus a verify-you're-done query

Card required. Cancel before day 7 and you are not charged.

Compare plans

More in this category

Other Planner tuning runbooks

Neighbouring incidents that share the same diagnostic surface.

Browse all 105 runbooks →

Connected

How this connects to the rest of the library

A live view of this page's real cross-references, what explains it, what fixes it, what to tune, and where to go next. Every link is an authored relationship, not a guess.

Open in the interactive map →
ShareLinkedInX

Need the full procedure?

Pro runbooks finish the incident path

Free runbooks teach the shape. Pro opens the full step transcript, edge cases, and prevention depth.

FollowSubstackLinkedInnew errors · lab notes · hiring loops