Re: primary key and existing unique fields

From: "Sally Sally" <dedeb17(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: bruno(at)wolff(dot)to
Subject: Re: primary key and existing unique fields
Date: 2004-10-28 19:13:14
Message-ID: BAY101-F13ZMGLoU2gO00010c6b@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think the same too but sometimes it seems in the real world performance is
given more value than a properly designed db. Or the long term flexiblity is
not taken into account given the short term requirements.
regards
Sally

>From: Bruno Wolff III <bruno(at)wolff(dot)to>
>To: Sally Sally <dedeb17(at)hotmail(dot)com>
>CC: pgsql-general(at)postgresql(dot)org, qnex42(at)gmail(dot)com
>Subject: Re: [GENERAL] primary key and existing unique fields
>Date: Thu, 28 Oct 2004 12:44:00 -0500
>
>On Thu, Oct 28, 2004 at 14:31:32 +0000,
> Sally Sally <dedeb17(at)hotmail(dot)com> wrote:
> > 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.
>
>I think it is better to worry about what is going to make it easiest to
>have clean data and to support future changes than worry about performance.
>Over the long run hardware is cheaper than people.
>
>---------------------------(end of broadcast)---------------------------
>TIP 8: explain analyze is your friend

_________________________________________________________________
Check out Election 2004 for up-to-date election news, plus voter tools and
more! http://special.msn.com/msn/election2004.armx

Browse pgsql-general by date

  From Date Subject
Next Message Robert Fitzpatrick 2004-10-28 19:36:00 Sorting street addresses
Previous Message Thomas Hallgren 2004-10-28 19:07:28 Re: Reasoning behind process instead of thread based