public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Senthilnathan M <[email protected]>
Cc: [email protected]
Subject: Re: Getting all the plans.
Date: Sat, 22 Mar 2025 12:16:41 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAL0OAhf8iWLSpY6sNzcyKrH5ZPyNe-e4bouKbH5xmmMES2MDww@mail.gmail.com>
References: <CAL0OAhf8iWLSpY6sNzcyKrH5ZPyNe-e4bouKbH5xmmMES2MDww@mail.gmail.com>

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






view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Getting all the plans.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox