From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: ow <oneway_111@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: pg 7.4.rc1, Range query performance
Date: Mon, 10 Nov 2003 16:57:51 -0800 (PST)
Message-ID: <20031110165327.P34950@megazone.bigpanda.com> (raw)
In-Reply-To: <20031111004139.47333.qmail@web21407.mail.yahoo.com>
References: <20031111004139.47333.qmail@web21407.mail.yahoo.com>
On Mon, 10 Nov 2003, ow wrote:
> --- Stephan Szabo <sszabo@megazone.bigpanda.com> wrote:
> > I'm not sure that AK_abc is the best index for check a range on a and
> > single values on b and c. I'd think that something like an index
> > on (b,c,a) would probably be better for this purpose (without doing any
> > testing ;) ).
>
> That would not work for us since most of the time users are working with most
> recent data, hence column "a" is the first in the index.
Are you doing alot of queries where you're only searching on a? If so,
then you may want to consider a second, non-unique index to speed up this
sort of query. With a range query on a and fixed values on b and c, you're
really not utilizing an index in that order efficiently.
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-sql@postgresql.org
Cc: sszabo@megazone.bigpanda.com, oneway_111@yahoo.com
Subject: Re: pg 7.4.rc1, Range query performance
In-Reply-To: <20031110165327.P34950@megazone.bigpanda.com>
* 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