Re: Can this query go faster???

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
Cc: Tino Wildenhain <tino(at)wildenhain(dot)de>, Pgsql-Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Can this query go faster???
Date: 2005-12-06 12:32:57
Message-ID: 1133872377.4779.200.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, 2005-12-06 at 13:20, Joost Kraaijeveld wrote:
[snip]
> Ah, a misunderstanding: I only need to calculate an index if the user
> wants a record that is not in or adjacent to the cache (in which case I
> can do a "select values > last value in the cache". So I must always
> materialize all rows below the wanted index.

In this case the query will very likely not work faster. It must always
visit all the records till the required offset. If the plan should be
faster using the index, then you probably need to analyze (I don't
recall from your former posts if you did it recently or not), in any
case you could check an "explain analyze" to see if the planner is
mistaken or not - you might already know this.

Cheers,
Csaba.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jan Wieck 2005-12-06 12:34:39 Re: Performance degradation after successive UPDATE's
Previous Message Tino Wildenhain 2005-12-06 12:30:25 Re: Can this query go faster???