Query performanceadvancedPro runbook

Why parallel query did not kick in

A big aggregate runs single-threaded while your cores sit idle. Understand the gates that block parallelism and a 297 ms serial scan becomes an 89 ms parallel one.

Problem

What you're actually looking at

The symptom as it shows up on a real server.

Parallel query has to clear several gates, table size, max_parallel_workers_per_gather, cost thresholds, and worker availability. Miss one and PostgreSQL silently runs the plan on a single worker while the box has cores to spare.

A Meridian aggregate over a large table runs as a single-threaded HashAggregate. With parallelism allowed, the same query fans out across workers and finishes in a third of the time.

Simple terms

PostgreSQL can split a big scan across several worker processes, but only if a whole checklist passes: the table is large enough, the setting max_parallel_workers_per_gather allows it, the estimated cost clears a threshold, and workers are actually free at that moment. Miss any one item and the query quietly runs on a single core while the rest of the machine sits idle. Knowing the checklist tells you exactly which knob to turn to get the spare cores working.

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 why parallel query did not kick in, 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

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