Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries
Дата
Msg-id 14925.1330013895@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries  (Marti Raudsepp <marti@juffo.org>)
Список pgsql-bugs
Marti Raudsepp <marti@juffo.org> writes:
> AFAICT, the model in the documentation suggests that the SELECT fields
> are evaluated for all matching rows in indeterminate order, before
> ORDER BY is applied and before the result set is sliced by
> OFFSET/LIMIT.

That is in fact the case if you have a query plan that involves a Sort
node followed by Limit.  We have some optimizations that avoid the need
for an explicit sort, but it would be pretty hard to write a
specification for exactly when unretrieved rows will not be evaluated.

            regards, tom lane

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

Предыдущее
От: Kouber Saparev
Дата:
Сообщение: Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6485: Primary index key not updated uniformly