pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Csaba Nagy <nagy@ecircle-ag.com>
To: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
Cc: Tino Wildenhain <tino@wildenhain.de>
Cc: Pgsql-Performance <pgsql-performance@postgresql.org>
Subject: Re: Can this query go faster???
Date: Tue, 06 Dec 2005 13:32:57 +0100
Message-ID: <1133872377.4779.200.camel@coppola.muc.ecircle.de> (raw)
In-Reply-To: <1133871645.8837.78.camel@Panoramix>
References: <1133862229.8837.61.camel@Panoramix>
	<1133862777.4779.185.camel@coppola.muc.ecircle.de>
	<1133864460.8837.69.camel@Panoramix>
	<439568C4.8050601@wildenhain.de>
	<1133868084.8837.73.camel@Panoramix>
	<439577D2.9090208@wildenhain.de>
	<1133871645.8837.78.camel@Panoramix>

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.





view thread (14+ messages)  latest in thread

Message-ID: <1133872377.4779.200.camel@coppola.muc.ecircle.de>
Permalink:  ../1133872377.4779.200.camel@coppola.muc.ecircle.de/
Also on:    postgresql.org/message-id/1133872377.4779.200.camel@coppola.muc.ecircle.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: nagy@ecircle-ag.com, J.Kraaijeveld@Askesis.nl, tino@wildenhain.de
  Subject: Re: Can this query go faster???
  In-Reply-To: <1133872377.4779.200.camel@coppola.muc.ecircle.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox