From: Greg Stark <gsstark@mit.edu>
To: Palle Girgensohn <girgen@pingpong.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: single index on more than two coulumns a bad thing?
Date: 01 Apr 2004 23:59:46 -0500
Message-ID: <871xn7otz1.fsf@stark.xeocode.com> (raw)
In-Reply-To: <24070000.1080860445@palle.girgensohn.se>
References: <24070000.1080860445@palle.girgensohn.se>
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
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: gsstark@mit.edu, girgen@pingpong.net
Subject: Re: single index on more than two coulumns a bad thing?
In-Reply-To: <871xn7otz1.fsf@stark.xeocode.com>
* 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