Hints and hazards: pg_plan_advice in PG19
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
ClickHouse's write-up tests pg_plan_advice, one of two contrib modules in Postgres 19 for query hints; the other, pg_stash_advice, attaches hints to query IDs. On ClickHouse Managed Postgres, a bitmap scan hint cut one query from about 1,462 ms to under 10 ms, and a join-order hint cut another from about 3,837 ms to 20 ms. After the data changed, the stale hint made the first query roughly 7,000 times slower than the unhinted plan. The tests are artificial, so the author advises periodic re-checks of hints.