Join Table

From: T E Schmitz <mailreg(at)numerixtechnology(dot)de>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Join Table
Date: 2004-11-01 16:34:32
Message-ID: 41866598.5040909@numerixtechnology.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2004-11-01 17:03:24 Re: Join Table
Previous Message Erik Wasser 2004-11-01 12:33:12 Re: 'show databases' in psql way?