<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/looking-forward-to-postgres-19-query-hints-ubjiqehqi" -->

---
title: Looking Forward to Postgres 19: Query Hints | daily.dev
description: Postgres 19 introduces two new contrib modules — pg_plan_advice and pg_stash_advice — that finally bring query hints (called &#x27;plan advice&#x27;) to core PostgreSQL...
canonical: https://daily.dev/posts/looking-forward-to-postgres-19-query-hints-ubjiqehqi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Looking Forward to Postgres 19: Query Hints | daily.dev
og:description: Postgres 19 introduces two new contrib modules — pg_plan_advice and pg_stash_advice — that finally bring query hints (called &#x27;plan advice&#x27;) to core PostgreSQL...
og:url: https://daily.dev/posts/looking-forward-to-postgres-19-query-hints-ubjiqehqi
og:image: https://api.daily.dev/og/posts/UbJiQEhqi.png
og:image:alt: Looking Forward to Postgres 19: Query Hints
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Looking Forward to Postgres 19: Query Hints

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 13 min read · 0 upvotes · 0 comments

## Summary

Postgres 19 introduces two new contrib modules — pg_plan_advice and pg_stash_advice — that finally bring query hints (called 'plan advice') to core PostgreSQL after a 15-year community debate. The post traces the history of that debate, explains why the community resisted hints, and details how Robert Haas designed the new system to address every major objection: advice lives outside SQL, constrains rather than replaces the planner, degrades gracefully with detailed feedback, and can be persisted per-session/role/database via a stash. The advice language supports scan methods, join order (strict and flexible), join methods, and parallel query control, all combinable in a single string. The planner can also generate its own advice strings from EXPLAIN output, making it easy to capture and tweak existing plans.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9ln>

## Similar posts on daily.dev

- [advice contrib module. – select \* from depesz;](https://daily.dev/posts/advice-contrib-module-select-from-depesz--jy7lidjez) · depesz · 0 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/looking-forward-to-postgres-19-query-hints-ubjiqehqi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Looking Forward to Postgres 19: Query Hints","url":"https://daily.dev/posts/looking-forward-to-postgres-19-query-hints-ubjiqehqi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/looking-forward-to-postgres-19-query-hints-ubjiqehqi"},"datePublished":"2026-06-05T14:34:10.121Z","dateModified":"2026-06-05T14:34:58.577Z","description":"Postgres 19 introduces two new contrib modules — pg_plan_advice and pg_stash_advice — that finally bring query hints (called 'plan advice') to core PostgreSQL...","image":"https://postgr.es/static/images/pgEdge-favicon.webp","thumbnailUrl":"https://postgr.es/static/images/pgEdge-favicon.webp","isAccessibleForFree":true,"articleSection":"Planet PostgreSQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet PostgreSQL","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/planet-postgresql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/looking-forward-to-postgres-19-query-hints-ubjiqehqi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"postgresql","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet PostgreSQL","item":"https://daily.dev/sources/planet-postgresql"},{"@type":"ListItem","position":3,"name":"Looking Forward to Postgres 19: Query Hints"}]}
```

