Re: optimizer not eliminating redundant sorts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: optimizer not eliminating redundant sorts
Дата
Msg-id 18226.1044575588@sss.pgh.pa.us
обсуждение исходный текст
Ответ на optimizer not eliminating redundant sorts  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Greg Stark <gsstark@mit.edu> writes:
> Another odd thing. This type of query seems to be causing redundant sorts.
> From what I've read in the source it tries quite hard to keep track of the
> sort order of subplans to avoid unnecessary sorts, so I think these are
> supposed to get optimized out.

It doesn't keep track of sort keys across subquery boundaries, which is
what you've got here.  I've thought about that in the past, but it'd be
nontrivial --- the sort keys known for the lower path would have to be
translated into the Var namespace of the upper query.  Hasn't got to the
top of the todo queue.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Pg_dumpall problem[2]
Следующее
От: Mitch
Дата:
Сообщение: Re: FreeBSD: SMP and PostgreSQL