Is there a way too speed up Limit with high OFFSET ? - Mailing list pgsql-general

From Georgi Ivanov
Subject Is there a way too speed up Limit with high OFFSET ?
Date
Msg-id AANLkTik-pZRpGTNcDrk-jauw7PTK23-szXxTTK+KqdLF@mail.gmail.com
Whole thread Raw
Responses Re: Is there a way too speed up Limit with high OFFSET ?
Re: Is there a way too speed up Limit with high OFFSET ?
List pgsql-general
Hi,
I have query like this
Select * from tabelname limit 10 OFFSET 10;

If i increase the OFFSET to 1000 for example, the query runs slower . The
bigger is OFFSET the slower is the query.

This is standard pagination feature i use for my website.
Actually the query is little bit more complex than this, but it is generally a
select with a join.

So i wander if there is a way to speed up this kind of query ?

I'm now reading about windowing functions , but I'm not sure this is the way
to go for this feature.


pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: MySQL versus Postgres
Next
From: Guillaume Lelarge
Date:
Subject: Re: Is there a way too speed up Limit with high OFFSET ?