Re: primary key and existing unique fields

From: "Sally Sally" <dedeb17(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: qnex42(at)gmail(dot)com
Subject: Re: primary key and existing unique fields
Date: 2004-10-28 14:31:32
Message-ID: BAY101-F12z1enAqpfk0000ecb7@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2004-10-28 14:32:34 Re: Reasoning behind process instead of thread based
Previous Message MaRCeLO PeReiRA 2004-10-28 14:25:30 Re: Tables and Indexes