Skip site navigation (1) Skip section navigation (2)

Speed with offset clause

From: Yves Vindevogel <yves(dot)vindevogel(at)implements(dot)be>
To: pgsql-performance(at)postgresql(dot)org
Subject: Speed with offset clause
Date: 2005-06-24 18:18:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Hi again all,

My queries are now optimised.  They all use the indexes like they 
However, there's still a slight problem when I issue the "offset" 

We have a table that contains 600.000 records
We display them by 25 in the webpage.
So, when I want the last page, which is: 600k / 25 = page 24000 - 1 = 
23999, I issue the offset of 23999 * 25
This take a long time to run, about 5-10 seconds whereas offset below 
100 take less than a second.

Can I speed this up ?

Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel

Attachment: Pasted Graphic 2.tiff
Description: image/tiff (5.6 KB)


pgsql-performance by date

Next:From: PuddleDate: 2005-06-24 18:54:31
Subject: max_connections / shared_buffers / effective_cache_size questions
Previous:From: Tom LaneDate: 2005-06-24 13:40:27
Subject: Re: Postgres 8 vs Postgres 7.4/cygwin

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group