Re: BUG #14411: Issue with using OFFSET - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #14411: Issue with using OFFSET
Date
Msg-id CACjxUsMPONtsFR2VZgseugBOTvvQpo=7aKRap=VfRviZG8yVJg@mail.gmail.com
Whole thread Raw
In response to BUG #14411: Issue with using OFFSET  (jkoceniak@mediamath.com)
Responses Re: BUG #14411: Issue with using OFFSET
List pgsql-bugs
On Thu, Nov 3, 2016 at 3:29 PM,  <jkoceniak@mediamath.com> wrote:

> Query performance decreases as the OFFSET increases.

Not a bug, but a fact of life.  It must generate the OFFSET number
of rows and continue to generated the next LIMIT rows (or continue
processing until there are no rows).  If matching rows are scarce
after OFFSET rows are found, it can take a while to get enough or
to find out that LIMIT rows don't exist.

Personally, I never use OFFSET and LIMIT for pagination; there are
better ways for most situations.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: jkoceniak@mediamath.com
Date:
Subject: BUG #14411: Issue with using OFFSET
Next
From: Michael Paquier
Date:
Subject: Re: Problems with "pg.dropped" column after upgrade 9.5 to 9.6