From: Benjamin Arai <benjamin@araisoft.com>
To: pgsql-general@postgresql.org
To: pgsql-performance@postgresql.org
Subject: Question about clustering multiple columns
Date: Tue, 13 Jun 2006 09:04:15 -0700
Message-ID: <002e01c68f03$05f00e10$6501a8c0@uni> (raw)
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?
Benjamin Arai
barai@cs.ucr.edu
http://www.benjaminarai.com <http://www.benjaminarai.com/;
Attachments:barai@cs.ucr.edu.vcf (text/x-vcard, 709B) download
BEGIN:VCARD
VERSION:2.1
N:Arai;Benjamin
FN:barai@cs.ucr.edu
ORG:University of California, Riverside
TITLE:PhD Student
TEL;WORK;VOICE:(951) 827-2838
TEL;HOME;VOICE:(951) 682-6816
TEL;CELL;VOICE:(626) 378-2992
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Department of Computer Science and Engineering=0D=0AEngineering BU2, Room =
351=0D=0AUniversity of California;Riverside;CA;92521;United States of Americ=
a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Department of Computer Science and Engineering=0D=0AEngineering BU2, Room 35=
1=0D=0AUniversity of California=0D=0ARiverside, CA 92521=0D=0AUnited States =
of America
URL;WORK:http://www.benjaminarai.com
EMAIL;PREF;INTERNET:barai@cs.ucr.edu
REV:20060520T165426Z
END:VCARD
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: benjamin@araisoft.com, pgsql-general@postgresql.org
Subject: Re: Question about clustering multiple columns
In-Reply-To: <002e01c68f03$05f00e10$6501a8c0@uni>
* 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