---
title: "pg_stash_advice"
description: "1 posts about pg_stash_advice, summarised, each linking to the original."
---

# pg\_stash\_advice
> 1 posts about pg\_stash\_advice, summarised, each linking to the original.

## Articles

### [Hints and hazards: pg\_plan\_advice in PG19](https://yomu.fyi/post/hints-and-hazards-pg-plan-advice-in-pg19.md)
- Company: [Clickhouse](https://yomu.fyi/company/clickhouse.md)
- Author: Colton Shepard
- Published: Nov 25, 2026
- Type: Explainer

Postgres 19 introduces pg\_plan\_advice and pg\_stash\_advice, two contrib modules that provide a query hint experience without affecting all queries or SQL syntax. pg\_plan\_advice works at the session level via SET commands, while pg\_stash\_advice applies hints to specific query identifiers. The extensions support specifying scan method, join order, join method, parallelism, partitionwise joins, and semijoin uniqueness. They work by telling the planner not to pick unselected options, but if no viable plan exists the advice is partially or fully ignored, and there is no check that the advice is good. The article demonstrates that while hints can dramatically improve performance in some scenarios, shifting data distributions can make them counterproductive, as shown by a bitmap heap scan hint that went from a 150x improvement to a 7,000x degradation.
