Re: Another planner bug with subqueries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Another planner bug with subqueries
Дата
Msg-id 13851.1039215216@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Another planner bug with subqueries  (Matthew Gabeler-Lee <mgabelerlee@zycos.com>)
Список pgsql-general
Matthew Gabeler-Lee <mgabelerlee@zycos.com> writes:
> When a view contains a subquery, sorted queries on the view don't put the
> sort inside the view query like they should.  7.2.3 did it properly, and so
> my most common query has now gone from <3s to several minutes.

This is a consequence of my quick-hack solution to your previous
problem: views with subselects in their targetlist will not be
flattened.

I'm afraid there's not much to be done about it for 7.3.* --- AFAICS,
a proper fix would be too big and too risky to put into the stable
branch.  The correct long-term fix (flatten join alias vars earlier)
has to wait until we do some fundamental planner work, and I don't
see any other safe quick-hack answer.

            regards, tom lane

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

Предыдущее
От: Rodrigo Leroux
Дата:
Сообщение: too much context switching?
Следующее
От: Laurette Cisneros
Дата:
Сообщение: bug?