Re: primary key and existing unique fields - Mailing list pgsql-general

From Sally Sally
Subject Re: primary key and existing unique fields
Date
Msg-id BAY101-F12z1enAqpfk0000ecb7@hotmail.com
Whole thread Raw
In response to primary key and existing unique fields  ("Sally Sally" <dedeb17@hotmail.com>)
Responses Re: primary key and existing unique fields  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Dawid,
I am interested in the first point you made that:
having varchar(12) in every referencing table, takes more storage
space.
The thing is though, if I have a serial primary key then it would be an
additional column. Or you are saying the space taken by a VARCHAR(12) field
is more than two INT fields? ( or is it the fact that when it is referenced
it will appear several times?) I guess the reason I am resisting the idea of
an additional primary key field is to avoid the additional lookup in some
queries. Perhaps it's a minor almost irrelevant performance factor.
Thanks
Sally

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee�
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


pgsql-general by date:

Previous
From: MaRCeLO PeReiRA
Date:
Subject: Re: Tables and Indexes
Next
From: Andrew Sullivan
Date:
Subject: Re: compatibilityissues from 7.1 to 7.4