Press "Enter" to skip to content

Query Hints and Plan Guides in RDBMS Products

Cristophe Pettus has a series in progress. The first post covers the basics of query hints and plan guides:

pg_plan_advice is expected to land in PostgreSQL 19. That makes this a good moment to look at query hints — what they are, what every other major database does with them, and how PostgreSQL ended up being the obvious outlier. Three parts. This is the first.

The second post explains why PostgreSQL hasn’t had query hints:

For most of PostgreSQL’s history, the official community position on query hints has been a polite version of “no, and stop asking.”

The position isn’t subtle. The PostgreSQL wiki maintains a page titled Not Worth Doing, and “Oracle-style optimizer hints” is listed there, right above in-process embedded mode and obfuscated function source. The companion wiki page, OptimizerHintsDiscussion, states the position outright:

Click through for a bit of history and comparison. The upcoming post promises to go into pg_plan_advice‘s proposal in more detail.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.