Re: Multicolum index and primary key

From: Michele Bendazzoli <mickymouse(at)mickymouse(dot)it>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Multicolum index and primary key
Date: 2003-11-17 17:33:56
Message-ID: 1069090436.8338.25.camel@mickymouse.sintel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 2003-11-17 at 17:14, Peter Eisentraut wrote:
> Michele Bendazzoli writes:
>
> > ALTER TABLE public.table1
> > ADD CONSTRAINT table1_pkey PRIMARY KEY(a, b, c);
> >
> > are the indexes over (a) and (a, b) redundant (and so useless)?
>
> Exactly.

> > p.s. I know, I'll have to begin to use the explain command ...
> > I promise I'll do it ;-)
>
> You could also have read the documentation about multicolumn indexes,
> because it contains exactly this example.

Thank you. I have read the chapter but I wonder if the implicit index
created by the primary key behaves as a normal indexes at all.

ciao, Michele

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michele Bendazzoli 2003-11-17 17:35:29 Re: Multicolum index and primary key
Previous Message Michele Bendazzoli 2003-11-17 17:00:32 Multicolum index and primary key