pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yves Vindevogel <yves.vindevogel@implements.be>
To: pgsql-performance@postgresql.org
Subject: Fwd: Speed with offset clause
Date: Fri, 24 Jun 2005 22:19:26 +0200
Message-ID: <2efd5ae220a4d27b141196b0e7c752e1@implements.be> (raw)

>
> Hmm, I can't do this, i'm afraid.  Or it would be rather difficult
>
> My query is executed through a webpage (link to the page in a 
> navigation bar)
> I do not know how many records there are (data is changing, and 
> currently is 600k records)
>
> The only thing I could do, is doing this in a function where I first 
> get the page, and then decide whether to use the normal sort order or 
> the reversed order
> That would put my weak point right in the middle, which is not that 
> bad, but I would like to find an easier way, if that is possible
>
> Huge memory would help ?
>
> On 24 Jun 2005, at 20:54, hubert depesz lubaczewski wrote:
>
>> On 6/24/05, Yves Vindevogel <yves.vindevogel@implements.be> wrote:
>>> So, when I want the last page, which is: 600k / 25 = page 24000 - 1 =
>>> 23999, I issue the offset of 23999 * 25
>>
>> improving this is hard, but not impossible.
>> if you have right index created, try to reverse the order and fetch
>> first adverts, and then resort it (just the 25 adverts) in correct
>> order.
>> it will be faster.
>>
>> depesz
>>
>>
> Met vriendelijke groeten,
> Bien à vous,
> Kind regards,
>
> Yves Vindevogel
> Implements
>
>
>
> Mail: yves.vindevogel@implements.be  - Mobile: +32 (478) 80 82 91
>
> Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
>
> Web: http://www.implements.be
>
> First they ignore you.  Then they laugh at you.  Then they fight you.  
> Then you win.
> Mahatma Ghandi.
>
Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements


Mail: yves.vindevogel@implements.be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76

Web: http://www.implements.be

First they ignore you.  Then they laugh at you.  Then they fight you.  
Then you win.
Mahatma Ghandi.

Attachments:

Pasted Graphic 2.tiff (image/tiff, 5.6K) download view image
Pasted Graphic 2.tiff (image/tiff, 5.6K) download view image

view thread (7+ messages)  latest in thread

Message-ID: <2efd5ae220a4d27b141196b0e7c752e1@implements.be>
Permalink:  ../2efd5ae220a4d27b141196b0e7c752e1@implements.be/
Also on:    postgresql.org/message-id/2efd5ae220a4d27b141196b0e7c752e1@implements.be

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: yves.vindevogel@implements.be
  Subject: Re: Fwd: Speed with offset clause
  In-Reply-To: <2efd5ae220a4d27b141196b0e7c752e1@implements.be>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox