X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B1FFE47644F for ; Wed, 14 May 2003 22:18:54 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 90738-04 for ; Wed, 14 May 2003 22:18:53 -0400 (EDT) Received: from shield.nordlb.lv (shield.pirmabanka.lv [195.114.57.4]) by postgresql.org (Postfix) with ESMTP id 7A64B475F16 for ; Wed, 14 May 2003 22:18:52 -0400 (EDT) Received: from wall2.pirmabanka.lv (wall2-pub.nordlb.lv [195.114.57.14]) by shield.nordlb.lv (8.12.9/8.12.9) with SMTP id h4F2Itbg019348 for ; Thu, 15 May 2003 05:18:55 +0300 Received: from share.nordlb.lv ([10.0.0.10]) by wall2.pirmabanka.lv; Thu, 15 May 2003 05:18:54 +0300 (EET DST) Received: from pc311x1.nordlb.lv (localhost.localdomain [127.0.0.1]) by nordlb.lv (8.11.6/8.11.6) with SMTP id h4F2Is523609 for ; Thu, 15 May 2003 05:18:54 +0300 Received: (qmail 2708 invoked by uid 100); 15 May 2003 02:21:35 -0000 Date: Thu, 15 May 2003 05:21:35 +0300 From: Victor Yegorov To: Rudi Starcevic Cc: Stephan Szabo , Postgres Performance Subject: Re: constraint with reference to the same table Message-ID: <20030515022135.GF1549@nordlb.lv> References: <20030514181136.S52444-100000@megazone23.bigpanda.com> <3EC2F1E4.8080706@oasis.net.au> <20030515015811.GE1549@nordlb.lv> <3EC2F65F.2050004@oasis.net.au> <3EC2F81B.10001@oasis.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <3EC2F81B.10001@oasis.net.au> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/173 X-Sequence-Number: 1952 * Rudi Starcevic [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