Re: constraint with reference to the same table

Rudi Starcevic <rudi@oasis.net.au>

From: Rudi Starcevic <rudi@oasis.net.au>
To: Rudi Starcevic <rudi@oasis.net.au>
Cc: Victor Yegorov <viy@nordlb.lv>, Stephan Szabo <sszabo@megazone23.bigpanda.com>, Postgres Performance <pgsql-performance@postgresql.org>
Date: 2003-05-15T02:14:51Z
Lists: pgsql-performance
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

Select b_id
 From business_people
where b_id = 1 and pn_id = 2;

I think this way I have an Index for 3 type's of queries.

When I looking for data on just the business,
when I'm looking for data on just people and
when I'm looking for data on business people relationships.

Cheers
Rudi.