Re: Normal vs Surrogate Primary Keys...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Normal vs Surrogate Primary Keys...
Дата
Msg-id 26430.1159755268@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Normal vs Surrogate Primary Keys...  ("rlee0001" <robeddielee@hotmail.com>)
Ответы Re: Normal vs Surrogate Primary Keys...  ("rlee0001" <robeddielee@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: "rlee0001"
Дата:
Сообщение: Normal vs Surrogate Primary Keys...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Major Performance decrease after some hours