Re: Postgres Planner Bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgres Planner Bug
Дата
Msg-id 18587.1033447235@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Postgres Planner Bug  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> The patch below 'fixes' this (and possibly breaks everything else). I
>> haven't tested it rigorously and it *just* special cases group by
>> clauses with functions in them.

Surely this cure is worse than the disease.

The general problem is that we don't attempt to match
arbitrary-expression GROUP BY clauses against arbitrary subexpressions
of sub-SELECTs.  While that could certainly be done, I'm concerned about
the cycles that we'd expend trying to match everything against
everything else.  This would be an exponential cost imposed on every
group-by-with-subselect query whether it needed the feature or not.

Given that GROUP BY is restricted to a simple column reference in both
SQL92 and SQL99, is it worth a large performance hit on unrelated
queries to support this feature?  What other DBs support it?
        regards, tom lane


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

Предыдущее
От: Gavin Sherry
Дата:
Сообщение: Re: Postgres Planner Bug
Следующее
От: Karel Zak
Дата:
Сообщение: Re: Postgresql likes Tuesday...