pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michele Bendazzoli <mickymouse@mickymouse.it>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Multicolum index and primary key
Date: Mon, 17 Nov 2003 18:33:56 +0100
Message-ID: <1069090436.8338.25.camel@mickymouse.sintel> (raw)
In-Reply-To: <Pine.LNX.4.44.0311171713460.12502-100000@peter.localdomain>
References: <Pine.LNX.4.44.0311171713460.12502-100000@peter.localdomain>

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






view thread (8+ messages)  latest in thread

Message-ID: <1069090436.8338.25.camel@mickymouse.sintel>
Permalink:  ../1069090436.8338.25.camel@mickymouse.sintel/
Also on:    postgresql.org/message-id/1069090436.8338.25.camel@mickymouse.sintel

 · 

reply

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-sql@postgresql.org
  Cc: mickymouse@mickymouse.it
  Subject: Re: Multicolum index and primary key
  In-Reply-To: <1069090436.8338.25.camel@mickymouse.sintel>

* 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