public inbox for [email protected]
help / color / mirror / Atom feedGetting all the plans.
2+ messages / 2 participants
[nested] [flat]
* Getting all the plans.
@ 2025-03-22 15:31 Senthilnathan M <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Senthilnathan M @ 2025-03-22 15:31 UTC (permalink / raw)
To: [email protected]
Hi all,
I came across this extension which shows all the plans considered by the
optimizer: https://github.com/misachi/pg_all_plans
Is there a way we can get this information directly instead of using an
extension? If not, does it make sense to add native support?
Please feel free to redirect me if this is not the right mailing list for
this topic.
Thanks,
Senthil
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Getting all the plans.
@ 2025-03-22 16:16 Tom Lane <[email protected]>
parent: Senthilnathan M <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-03-22 16:16 UTC (permalink / raw)
To: Senthilnathan M <[email protected]>; +Cc: [email protected]
Senthilnathan M <[email protected]> writes:
> I came across this extension which shows all the plans considered by the
> optimizer: https://github.com/misachi/pg_all_plans
> Is there a way we can get this information directly instead of using an
> extension? If not, does it make sense to add native support?
The reason it's an extension is that the idea has already been
rejected (many times) by the core project.
FYI, this particular version is not showing you anywhere near "all"
the considered plans. That's impossible really because the planner
prunes the search space as heavily as it can. Most potential plans
are not carried as far as generating a complete Path tree in the
first place. Even the ones that do get to the "final rel" stage
will be thrown away if they are dominated by some other one on
all the planner's figures-of-merit. So this is going to show you
only a small fraction of the possible plans. If you are unhappy
because you suspect the planner rejected what would really have
been the best plan, the odds are good this won't help you because
the plan you want to see didn't survive long enough to be shown.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-03-22 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-22 15:31 Getting all the plans. Senthilnathan M <[email protected]>
2025-03-22 16:16 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox