Re: Cursors or Offset, Limit?

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Cursors or Offset, Limit?
Дата
Msg-id 20051116204339.GB23557@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на Cursors or Offset, Limit?  (Jerry LeVan <Jerry.Levan@EKU.EDU>)
Список pgsql-general
On Tue, Nov 15, 2005 at 01:44:32PM -0500, Jerry LeVan wrote:
>
> What are some of the tradeoffs between using a cursor and using the
> limit/offset method of selecting rows to display?

OFFSET actually has to scan all the preceding rows every time (plus
to get it consistently, you need to do an ORDER BY), so it's fast at
first but possibly painfully slow in the last rows (especially on a
large table).

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
        --Alexander Hamilton

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

Предыдущее
От: "pgsql-general@list.coretech.ro"
Дата:
Сообщение: absolute or relative updates
Следующее
От: Chris Browne
Дата:
Сообщение: Re: Rebranding PostgreSQL