Re: Takes too long to fetch the data from database - Mailing list pgsql-performance

From Bruno Wolff III
Subject Re: Takes too long to fetch the data from database
Date
Msg-id 20060420063014.GA25438@wolff.to
Whole thread Raw
In response to Re: Takes too long to fetch the data from database  ("soni de" <soni.de@gmail.com>)
List pgsql-performance
On Thu, Apr 20, 2006 at 11:07:31 +0530,
  soni de <soni.de@gmail.com> wrote:
> Please provide me some help regarding how could I use cursor in following
> cases? :
>
> I want to fetch 50 records at a time starting from largest stime.
>
> SELECT * FROM wan ORDER BY stime LIMIT 50 OFFSET 81900;

Something like the following may be faster:
SELECT * FROM wan ORDER BY stime DESC LIMIT 50;

pgsql-performance by date:

Previous
From: "soni de"
Date:
Subject: Re: Takes too long to fetch the data from database
Next
From: "Doron Baranes"
Date:
Subject: Perfrmance Problems (7.4.6)