← concepts · the commons
query plan
also known as execution plan · query plans · query planning
10 moment(s) that assert this concept — showing 1–10 of 10
moderateTwo independent sources — corroborated, but not broadly
↣ how this spread over time →pganalyze · youtube · en-US
1The pg_plan_advice feature can emit advice that, when applied to Postgres, results in the same query plan being generated.
“it can emit a string of advice, and if you pass that string back to Postgres, you get the same plan.”
spoken · 221s · 2026-02-05
pganalyze · youtube · en-US
2Plan advice aims to produce repeatable query plans that remain stable even when statistics change.
“I wanna have stable query plans, which I think a lot of people care about.”
spoken · 241s · 2026-02-05
pganalyze · youtube · en-US
3A new bitmask mechanism, called pgs_mask, allows the planner to specify constraints on query plan choices for specific tables.
“what was added was a bitmask. The idea is we have this new 'pgs_mask' mechanism, and you set this on RelOptInfo.”
spoken · 278s · 2026-02-05
pganalyze · youtube · en-US
4The pgs_mask mechanism enables users to instruct Postgres not to use sequential scans for specific tables.
“you can now modify this 'pgs_mask' to tell Postgres for this particular table, don't use sequential scans.”
spoken · 295s · 2026-02-05
pganalyze · youtube · en-US
5Prior to this change, there was no direct way to constrain query plan choices, requiring workarounds like hint plan.
“There was basically no way of doing this before. You had to do the quirky stuff that hint plan had to do.”
spoken · 297s · 2026-02-05
pganalyze · youtube · en-US
6The pgs_mask mechanism simplifies pg_hint_plan by eliminating the need for code duplication and complex workarounds.
“it should make the maintenance of hint plan much easier because it avoids hint plan copying any code.”
spoken · 323s · 2026-02-05
pganalyze · youtube · en-US
7pg_hint_plan now modifies query plan behavior by adjusting the pgs_mask instead of using complex, creative strategies.
“now hint plan just modifies this mask. Can set things like, if somebody wants a merge join, we'll make sure we get a merge join”
spoken · 370s · 2026-02-05
pganalyze · youtube · en-US
8The pgs_mask mechanism aligns query plan modifications more closely with user intent than previous workarounds.
“all of this is just a lot simpler and closer to the intent that the user specifies, versus having to do a lot of workarounds to try to get Postgres to do the right thing.”
spoken · 385s · 2026-02-05
PGCon · youtube · en
9Query planning transforms a parsed SQL query into an execution plan through semantic and cost-based optimizations.
“a query a sequel query is parsed and then query planning happens and then that resulting Pantry is executed in Postgres”
spoken · 90s · 2019-06-10
PGCon · youtube · en
10The plan tree is a data structure used to represent the execution plan of a query and is central to the presentation.
“Plan tree this is the plan statement data structure that I'll also be using that the presentation the plan tree member of it's the one that we care most about”
spoken · 225s · 2019-06-10