From: Bruno Wolff III <bruno@wolff.to>
To: Palle Girgensohn <girgen@pingpong.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: single index on more than two coulumns a bad thing?
Date: Fri, 2 Apr 2004 09:56:04 -0600
Message-ID: <20040402155604.GC5151@wolff.to> (raw)
In-Reply-To: <24070000.1080860445@palle.girgensohn.se>
References: <24070000.1080860445@palle.girgensohn.se>
On Fri, Apr 02, 2004 at 01:00:45 +0200,
Palle Girgensohn <girgen@pingpong.net> wrote:
>
> Is it always bad to create index xx on yy (field1, field2, field3);
>
> I guess the problem is that the index might often grow bigger than the
> table, or at least big enough not to speed up the queries?
One place where you need them in postgres is enforcing unique multicolumn
keys. These will get created implicitly from the unique (or primary key)
constraint. It isn't all that unusual to have a table that describes
a many to many (to many ...) relationship where the primary key is all
of the columns.
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: bruno@wolff.to, girgen@pingpong.net
Subject: Re: single index on more than two coulumns a bad thing?
In-Reply-To: <20040402155604.GC5151@wolff.to>
* 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