Re: how to make this database / query faster

From: Volkan YAZICI <yazicivo(at)ttmail(dot)com>
To: mark <markkicks(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to make this database / query faster
Date: 2008-03-16 08:01:23
Message-ID: 87wso3rtbg.fsf@alamut.mobiliz.com.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 15 Mar 2008, mark <markkicks(at)gmail(dot)com> writes:
> select * from users where session_key is not Null order by id offset OFFSET limit 300
>
> i want to go through the whole table... it gets really slow like
> greater than 5 minutes when the OFFSET is over 500,000..

Did you try your chance with CURSORs? (See manual page for DECLARE.)

Regards.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma 2008-03-16 15:25:40 Re: how to make this database / query faster
Previous Message askel 2008-03-16 04:26:48 on insert when ... do instead update