Re: [GENERAL] Multi-column Indexes. What is best Conan?

From: dustin sallings <dustin(at)spy(dot)net>
To: Rodney McDuff <ccmcduff(at)its(dot)uq(dot)edu(dot)au>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Multi-column Indexes. What is best Conan?
Date: 1999-03-10 03:39:20
Message-ID: Pine.NEB.4.10.9903091934110.425-100000@mobile
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 10 Mar 1999, Rodney McDuff wrote:

Those do two different things. If you always plan using doing
lookups on both of those columns at the same time, it only makes sense to
do one index with both. If you rarely do, but do lots of lookups using
either, then do more than one index. You also might want to do both,
depending on what you're doing.

I think a good rule of thumb is to index as much as you can as
long as it doesn't slow down your inserts too much and doesn't eat up too
much disk space.

// Hi
// When you have a table with multiple columns and you want indexes on
// them you can either
// (a) create index table_idx on table using btree ( col1, col2, ..., col7);
//
// or
// (b) create index table_col1_idx on table using btree ( col1 );
// create index table_col2_idx on table using btree ( col2 );
// .
// .
// .
//
// But what is best?
//
//
//

--
Principal Member Technical Staff, beyond.com The world is watching America,
pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin(at)spy(dot)net>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L______________________________________________ and America is watching TV. __

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthew 1999-03-10 05:45:36 SQL Question
Previous Message Rodney McDuff 1999-03-10 03:17:28 Multi-column Indexes. What is best Conan?