Re: Speed Up Offset and Limit Clause

From: PFC <lists(at)peufeu(dot)com>
To: "Christian Paul Cosinas" <cpc(at)cybees(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Speed Up Offset and Limit Clause
Date: 2006-05-11 07:05:56
Message-ID: op.s9dkn6lycigqcu@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Why do you want to use it this way ?
Explain what you want to do, there probably is another faster solution...

On Thu, 11 May 2006 16:45:33 +0200, Christian Paul Cosinas
<cpc(at)cybees(dot)com> wrote:

> Hi!
>
> How can I speed up my server's performance when I use offset and limit
> clause.
>
> For example I have a query:
> SELECT * FROM table ORDER BY id, name OFFSET 100000 LIMIT 10000
>
> This query takes a long time about more than 2 minutes.
>
> If my query is:
> SELECT * FROM table ORDER BY id, name OFFSET 50000 LIMIT 10000
> It takes about 2 seconds.
>
> Thanks
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Zeugswetter Andreas DCP SD 2006-05-11 07:55:15 Re: [HACKERS] Big IN() clauses etc : feature proposal
Previous Message Chris 2006-05-11 06:51:36 Re: Speed Up Offset and Limit Clause