Re: constraint with reference to the same table

From: Victor Yegorov <viy(at)nordlb(dot)lv>
To: Rudi Starcevic <rudi(at)oasis(dot)net(dot)au>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, Postgres Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: constraint with reference to the same table
Date: 2003-05-15 02:21:35
Message-ID: 20030515022135.GF1549@nordlb.lv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

* Rudi Starcevic <rudi(at)oasis(dot)net(dot)au> [15.05.2003 05:15]:
> Perhaps I also need a 3rd Index ?
>
> One for Business's
> One for People and
> One for Business_People.
>
> I think I may need the 3rd Index for query's like

You don't need it. Primary key on that 2 columns will create a unique index
on them. Of course, if you left things unchanged - you'll need to create
business_people index yourself.

execute:

=> \d business_people

and take a glance on a line, describing primary key.

--

Victor Yegorov

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-05-15 02:25:55 Re: INNER JOIN vs WHERE
Previous Message Rudi Starcevic 2003-05-15 02:14:51 Re: constraint with reference to the same table