Re: Shortcutting too-large offsets?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Shortcutting too-large offsets?
Дата
Msg-id 6843.1317393410@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Shortcutting too-large offsets?  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Shortcutting too-large offsets?
Список pgsql-performance
Josh Berkus <josh@agliodbs.com> writes:
> Here's a case which it seems like we ought to be able to optimize for:
> [ offset skips all the output of a sort node ]
> Is there some non-obvious reason which would make this kind of
> optimization difficult?  Doesn't the executor know at that point how
> many rows it has?

In principle, yeah, we could make it do that, but it seems like a likely
source of maintenance headaches.  This example is not exactly compelling
enough to make me want to do it.  Large OFFSETs are always going to be
problematic from a performance standpoint, and the fact that we could
short-circuit this one corner case isn't really going to make them much
more usable.

            regards, tom lane

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

Предыдущее
От: bricklen
Дата:
Сообщение: Re: array_except -- Find elements that are not common to both arrays
Следующее
От: pasman pasmański
Дата:
Сообщение: Re: Shortcutting too-large offsets?