Re: Normal vs Surrogate Primary Keys...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "rlee0001" <robeddielee(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Normal vs Surrogate Primary Keys...
Date: 2006-10-02 02:14:28
Message-ID: 26430.1159755268@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"rlee0001" <robeddielee(at)hotmail(dot)com> writes:
> ... I know, for example, that by default PostgreSQL assigns every record a
> small unique identifier called an OID.

Well, actually, that hasn't been the default for some time, and even if
you turn it on it's not guaranteed unique without additional steps, and
seeing that it's only 32bits wide it's not usable as a unique ID for
very large tables.

"unique" and "small" are more or less contradictory in this context.

> ... it seems like this is the sort of thing that even a fully SQL-compliant
> DBMS could do internally to compensate for the performance issues with
> using large natural keys in relationships.

What performance issues are those, exactly? I have seen no data that
proves that large key size is a bottleneck for reasonable schema designs
in Postgres. Maybe that just means that we have more fundamental
problems to fix :-( ... but there's no point in investing a lot of
effort on an aspect that isn't the next bottleneck.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-10-02 02:43:14 Re: Major Performance decrease after some hours
Previous Message rlee0001 2006-10-02 00:58:28 Normal vs Surrogate Primary Keys...