Re: Query planner unaware of possibly best plan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query planner unaware of possibly best plan
Дата
Msg-id 9259.1190441248@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query planner unaware of possibly best plan  (Denes Daniel <panther-d@freemail.hu>)
Ответы Re: Query planner unaware of possibly best plan  (Denes Daniel <panther-d@freemail.hu>)
Список pgsql-performance
Denes Daniel <panther-d@freemail.hu> writes:
> Simon Riggs <simon@2ndquadrant.com> wrote:
>> Make the case. **I** want it is not sufficient...

> Sorry, I can't understand that... I'm far from perfect in english.

The point here is that you've repeated the same example N times without
actually making a case that it's interesting to support.  We have to
think about the intellectual complexity that would be added to the
planner to support this case, and the cycles that would be expended
on every query (and wasted, for most queries) on trying to detect
whether the case applies.  If it were simple and cheap to do, these
arguments wouldn't hold much weight, but it doesn't look to me like
either is the case.

Another problem is that it's not clear there's much to be gained.
Avoiding the sort step is only interesting if the query produces so many
rows that a sort would be expensive ... but if that's the case, it seems
unlikely that a nestloop indexscan plan would be the best choice anyway.

So basically this looks like a lot of work for a narrow and questionable
gain.  If you want it to happen you need to convince people that it's
easier and more useful than it looks.

            regards, tom lane

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

Предыдущее
От: Denes Daniel
Дата:
Сообщение: Re: Query planner unaware of possibly best plan
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Low CPU Usage