Re: single index on more than two coulumns a bad thing?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Palle Girgensohn <girgen(at)pingpong(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: single index on more than two coulumns a bad thing?
Date: 2004-04-02 04:59:46
Message-ID: 871xn7otz1.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


Palle Girgensohn <girgen(at)pingpong(dot)net> writes:

> Is it always bad to create index xx on yy (field1, field2, field3);

All generalisations are false...

Seriously, it's true that as the length of your index key gets longer the
harder and harder it is to justify it. That doesn't mean they're always wrong,
but you should consider whether a shorter key would perform just as well.

The other problem with long index keys is that they often show up in the same
place as having dozens of indexes on the same table. Usually in shops where
the indexes were created after the fact looking at specific queries.

--
greg

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-04-02 06:32:10 Re: PostgreSQL and Linux 2.6 kernel.
Previous Message Greg Stark 2004-04-02 04:44:29 Re: Index Performance Help