X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5786E3A4645 for ; Mon, 1 Nov 2004 16:34:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81256-09 for ; Mon, 1 Nov 2004 16:34:49 +0000 (GMT) Received: from msgdirector2.onetel.net.uk (msgdirector2.onetel.net.uk [212.67.96.149]) by svr1.postgresql.org (Postfix) with ESMTP id 751D23A4588 for ; Mon, 1 Nov 2004 16:34:48 +0000 (GMT) Received: from bolek.coachhouse (213-78-103-81.friaco.onetel.net.uk [213.78.103.81]) by msgdirector2.onetel.net.uk (MOS 3.4.6-GR) with ESMTP id CAD79630; Mon, 1 Nov 2004 16:34:43 GMT Received: (Exim 3.36) #1 (Debian)) protocol: esmtp id 1COf8a-0002ck-00 ; Mon, 01 Nov 2004 16:34:32 +0000 Message-ID: <41866598.5040909@numerixtechnology.de> Date: Mon, 01 Nov 2004 16:34:32 +0000 From: T E Schmitz Reply-To: mailreg@numerixtechnology.de User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql Subject: Join Table Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200411/7 X-Sequence-Number: 19326 Hello, I have created the following join table: the two FKs are the PK of the table. Typically, I will need to select rows for a given ITEM_FK. Question: is it necessary/advisable to create an index for the ITEM_FK column? Or is this redundantbecause this column is already one of the PK columns? CREATE TABLE SUPPLY ( ITEM_FK integer NOT NULL, CONTACT_FK integer NOT NULL, COST numeric (7,2), PRIMARY KEY (ITEM_FK,CONTACT_FK) ); -- Regards/Gruß, Tarlika Elisabeth Schmitz