Re: Possible bug in query planner when using DISTINCT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Possible bug in query planner when using DISTINCT
Дата
Msg-id 16982.1037301933@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Possible bug in query planner when using DISTINCT  (Nick Howden <n.howden@eris.qinetiq.com>)
Список pgsql-bugs
Nick Howden <n.howden@eris.qinetiq.com> writes:
> Using postgres 7.2.3 the query planner seems to lose interest in using
> indexes when DISTINCT is used.

I don't think this is a bug.  DISTINCT requires a sort step, so even
though you have a LIMIT, the planner has to plan on the basis of reading
the entire join table.  The nestloop plan loses badly on that basis.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug #818: There are no aggregate functions for type RELTIME
Следующее
От: Theodore Petrosky
Дата:
Сообщение: new journaling system in OSX