From: Bruno Wolff III <bruno@wolff.to>
To: Benjamin Arai <benjamin@araisoft.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: Question about clustering multiple columns
Date: Fri, 16 Jun 2006 10:31:32 -0500
Message-ID: <20060616153132.GA9056@wolff.to> (raw)
In-Reply-To: <002e01c68f03$05f00e10$6501a8c0@uni>
References: <002e01c68f03$05f00e10$6501a8c0@uni>
On Tue, Jun 13, 2006 at 09:04:15 -0700,
Benjamin Arai <benjamin@araisoft.com> wrote:
> Hi,
>
> I have a database where there are three columns (name,date,data). The
> queries are almost always something like SELECT date,data FROM table WHERE
> name=blah AND date > 1/1/2005 AND date < 1/1/2006;. I currently have three
> B-tree indexes, one for each of the columns. Is clustering on date index
> going to be what I want, or do I need a index that contains both name and
> date?
I would expect that clustering on the name would be better for the above
query.
You probably want an index on name and date combined.
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: bruno@wolff.to, benjamin@araisoft.com, pgsql-general@postgresql.org
Subject: Re: Question about clustering multiple columns
In-Reply-To: <20060616153132.GA9056@wolff.to>
* 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