Re: single index on more than two coulumns a bad thing? - Mailing list pgsql-performance

From Greg Stark
Subject Re: single index on more than two coulumns a bad thing?
Date
Msg-id 871xn7otz1.fsf@stark.xeocode.com
Whole thread Raw
In response to single index on more than two coulumns a bad thing?  (Palle Girgensohn <girgen@pingpong.net>)
List pgsql-performance
Palle Girgensohn <girgen@pingpong.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

pgsql-performance by date:

Previous
From: Greg Stark
Date:
Subject: Re: Index Performance Help
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL and Linux 2.6 kernel.