Re: Predicate migration on complex self joins

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Predicate migration on complex self joins
Дата
Msg-id 4A5B28590200002500028720@gw.wicourts.gov
обсуждение исходный текст
Ответ на Predicate migration on complex self joins  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Predicate migration on complex self joins  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> wrote:
> select count(*) 
> from foo1 a, foo1 b 
> where a.c1 = b.c1 /* PK join */
> You may well ask who would be stupid enough to write SQL like that.
> The answer is of course that it is automatically generated by an
> ORM.
We had to do something like that to get acceptable performance from
Sybase ASE.  That code probably has not been changed since migrating
to PostgreSQL, and since we have a strong portability mandate, it
probably should be left alone, since the penalty for the extra join in
PostgreSQL is small and the penalty for not having it in Sybase ASE is
large.
In short, it would be a welcome optimization here, although (in our
case) a relatively minor one.
-Kevin


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Upgrading our minimum required flex version for 8.5
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Predicate migration on complex self joins