pg_plan_advice — help the planner get the right plan
7.9 relevance
Score Breakdown
technical depth 9
novelty 7
actionability 8
community 7
strategic 6
personal 9
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
PostgreSQL query plan advisory tool, directly useful for data engineering and performance tuning
Summary
PostgreSQL 19's pg_plan_advice module provides a mini-language (e.g., JOIN_ORDER, HASH_JOIN) to describe and enforce query plans by constraining the planner's choices, not replacing it. Developers can obtain advice strings via EXPLAIN with the PLAN_ADVICE option and apply them using the pg_plan_advice.advice setting. While useful for stabilizing optimal plans, overriding the planner risks performance degradation if underlying data distributions change, as the planner can no longer adapt.