Re: composite versus sequence pk

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Leszek Kotzian" <l(dot)kotzian(at)fi(dot)com>
Cc: sfpug(at)postgresql(dot)org
Subject: Re: composite versus sequence pk
Date: 2005-03-30 18:48:09
Message-ID: 200503301048.09709.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Leszek,

> I speculate that because there would be one less column to insert/update
> it should not be worse. Not sure though what's the overhead of handling
> composite PK on INSERT/UPDATE operation.

No, it should be better. The reason one uses surrogate keys (i.e. sequence
IDs) is to simplify joins to other tables. Within the table itself,
there's no reason to use them.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse sfpug by date

  From Date Subject
Next Message Josh Berkus 2005-03-30 19:01:10 Time for April 12 meeting
Previous Message Leszek Kotzian 2005-03-30 16:42:04 composite versus sequence pk