Multiple indexes or multi-column index?

From: Jeff Boes <jboes(at)nexcerpt(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Multiple indexes or multi-column index?
Date: 2002-08-13 20:14:31
Message-ID: ajbpaf$14va$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Given a large (100,000+ rows) table such as:

CREATE TABLE foo (
a INTEGER,
b INTEGER,
c TIMESTAMP,
d TEXT
/* possibly several more columns in here */
);

What are the pros and cons of these two different approaches to indexes?

CREATE huge_index ON foo (a,b,c,d);

vs.

CREATE a_index ON foo (a);
CREATE b_index ON foo (b);
CREATE c_index ON foo (c);
CREATE d_index ON foo (d);

--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
...Nexcerpt... Extend your Expertise

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Marc Mitchell 2002-08-13 21:00:17 Re: Multiple indexes or multi-column index?
Previous Message Thomas O'Connell 2002-08-13 19:32:22 Re: performance tuning: shared_buffers, sort_mem; swap