public inbox for [email protected]
help / color / mirror / Atom feedFrom: Robert Haas <[email protected]>
To: Tom Lane <[email protected]>
Cc: Anthonin Bonnefoy <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Add ALL_CANDIDATES option to EXPLAIN
Date: Fri, 26 Jul 2024 13:53:09 -0400
Message-ID: <CA+TgmoYQuLXaLGXWGq-HmzgcDRtEjiZRk73rjrAujmp0npRrGg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAO6_Xqoke6qntHS8odYXT_P2Lrj7dNXgsCds+C8zLOXBbNefvg@mail.gmail.com>
<CA+TgmoYpwd7aidqF_pyeoddz6iUfFSQdy0ZBiH5eWxnvNn7-ig@mail.gmail.com>
<[email protected]>
On Fri, Jul 26, 2024 at 1:40 PM Tom Lane <[email protected]> wrote:
> I wonder how far you'd get by just printing the surviving paths
> (that is, something like Anthonin's patch, but without lobotomizing
> add_path). The survivors would have to dominate the cheapest-total
> path along one of the other metrics add_path considers, which
> seems like a rough approximation of "interestingly different".
My guess is it wouldn't be that great. It seems easy to imagine that
the key decision for a particular plan might be whether to use table A
or B as the driving table, or whether to sequential scan or index scan
some table involved in the query. It could well be that you end up
with the same output ordering either way (or no output ordering) for
one reason or another. I'm actually not sure "interestingly different"
can be defined in a useful, general way, because how is the computer
to know what the human being cares about in a particular case? In
practice, it feels like what you'd often like to do is say "show me
the plan if you { started with table | used scan method Y on table X |
did not use index X | whatever }". I haven't given up on the idea that
there could be some way of defining interesting-ness that avoids the
need for the user to say what they think is interesting, but it
certainly feels like one needs to be a lot more clever to make it work
without user input.
--
Robert Haas
EDB: http://www.enterprisedb.com
view thread (5+ 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: Add ALL_CANDIDATES option to EXPLAIN
In-Reply-To: <CA+TgmoYQuLXaLGXWGq-HmzgcDRtEjiZRk73rjrAujmp0npRrGg@mail.gmail.com>
* 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