From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Treat <xzilla@users.sourceforge.net>
Cc: Paul McKay <paul_mckay@clearwater-it.co.uk>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow query performance on large table
Date: Tue, 04 Mar 2003 12:20:26 -0500
Message-ID: <25725.1046798426@sss.pgh.pa.us> (raw)
In-Reply-To: <1046797349.16957.20.camel@camel>
References: <000001c2e268$b1e47210$0c64a8c0@paulspc>
<1046797349.16957.20.camel@camel>
Robert Treat <xzilla@users.sourceforge.net> writes:
> Maybe it's just me, but I get the feeling you need to work some regular
> reindexing into your maintenance schedule.
Or at least, more vacuuming...
> Given your query is using
> between, I don't think it would use the index on the time field anyway
> (and explain analyze seems to be supporting this). Rewrite it so that
> you have a and time > foo and time < bar and I think you'll see a
> difference.
No, you won't, because that's exactly what BETWEEN is.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, xzilla@users.sourceforge.net, paul_mckay@clearwater-it.co.uk
Subject: Re: Slow query performance on large table
In-Reply-To: <25725.1046798426@sss.pgh.pa.us>
References: <000001c2e268$b1e47210$0c64a8c0@paulspc> <1046797349.16957.20.camel@camel> <25725.1046798426@sss.pgh.pa.us>
* 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