Re: Takes too long to fetch the data from database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 20, 2006 at 11:07:31 +0530,
  soni de <soni.de@xxxxxxxxx> 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;


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux