Planner tuningadvancedPro runbook

Help the planner with effective_cache_size

effective_cache_size tells the planner how much memory it can assume is available for caching. It allocates nothing, but raising it lowers the estimated cost of index-friendly plans, here from 10612 to 8240 for the same query.

Problem

What you're actually looking at

The symptom as it shows up on a real server.

effective_cache_size does not reserve memory; it is a hint about how much OS+shared cache the planner can assume when costing repeated index access. Set too low, the planner overestimates how often index pages must be re-read from disk and shies away from nested-loop/index plans.

Meridian's effective_cache_size is left at a conservative default, so the planner costs its index-driven join pessimistically. Raising it to reflect actual RAM lowers the estimated cost of the same plan.

Simple terms

effective_cache_size does not reserve any memory, it is only a hint telling the planner how much RAM it can assume is available for caching data. Set it too low and the planner assumes index pages will constantly have to be re-read from disk, so it avoids index-driven plans. Raising it to reflect the machine's real memory lowers the estimated cost of those plans, so the planner stops being needlessly pessimistic.

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 help the planner with effective_cache_size, 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