Re: feature request: explain "with details" option

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: feature request: explain "with details" option
Дата
Msg-id 20277.1473395742@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: feature request: explain "with details" option  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: feature request: explain "with details" option  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: feature request: explain "with details" option  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> writes:
> On 9 September 2016 at 01:40, Roger Pack <rogerdpack2@gmail.com> wrote:
>> Today's explain tells us what loops and scans were used, and relative
>> costs, etc.  It doesn't seem to tell *why* the planner elected to use
>> what it did.

> One thing that's been discussed here is to have a way to see which
> potential plans are rejected and compare their costs.

> This isn't simple because there are often *lots* of variants. You
> don't just want to see the "top 10" candidate plans, because they're
> probably a bunch of small variants on the same plan; the ones you'll
> be interested in will probably be very different plans with very bad
> relative estimates.

The other big problem here is that the planner tries *very* hard to reject
losing paths early; so it does not even form an explainable plan for a
large fraction of the search space.  (And if it did, you'd be dead before
you got your EXPLAIN result back.)

People have experimented with making the planner log every candidate path
before the path enters the comparison tournament (and, typically, doesn't
survive the first round).  But I've never seen any version of that that
I thought would be intelligible to non-experts.  It's exceedingly verbose
and it certainly doesn't look anything like what we know as EXPLAIN output.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Logical Replication WIP
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: [sqlsmith] Failed assertion in joinrels.c