Re: Normal vs Surrogate Primary Keys... - Mailing list pgsql-general

From Tom Lane
Subject Re: Normal vs Surrogate Primary Keys...
Date
Msg-id 26430.1159755268@sss.pgh.pa.us
Whole thread Raw
In response to Normal vs Surrogate Primary Keys...  ("rlee0001" <robeddielee@hotmail.com>)
Responses Re: Normal vs Surrogate Primary Keys...
List pgsql-general
"rlee0001" <robeddielee@hotmail.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

pgsql-general by date:

Previous
From: "rlee0001"
Date:
Subject: Normal vs Surrogate Primary Keys...
Next
From: Tom Lane
Date:
Subject: Re: Major Performance decrease after some hours