pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: T E Schmitz <mailreg@numerixtechnology.de>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Join Table
Date: Mon, 01 Nov 2004 16:34:32 +0000
Message-ID: <41866598.5040909@numerixtechnology.de> (raw)

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



view thread (7+ messages)  latest in thread

Message-ID: <41866598.5040909@numerixtechnology.de>
Permalink:  ../41866598.5040909@numerixtechnology.de/
Also on:    postgresql.org/message-id/41866598.5040909@numerixtechnology.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mailreg@numerixtechnology.de
  Subject: Re: Join Table
  In-Reply-To: <41866598.5040909@numerixtechnology.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox