Re: Surrogate keys (Was: enums)

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Surrogate keys (Was: enums)
Дата
Msg-id 812B6253-520A-46E1-A120-011F23B558D7@myrealbox.com
обсуждение исходный текст
Ответ на Surrogate keys (Was: enums)  (Leandro Guimarães Faria Corcete DUTRA<leandro@dutra.fastmail.fm>)
Ответы Re: Surrogate keys (Was: enums)  (Lukas Smith <smith@pooteeweet.org>)
Re: Surrogate keys (Was: enums)  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
On Jan 13, 2006, at 21:42 , Leandro Guimarães Faria Corcete DUTRA wrote:

> If you still declare the natural key(s) as UNIQUEs, you have just made
> performance worse.  Now there are two keys to be checked on UPDATEs
> and
> INSERTs, two indexes to be updated, and probably a SEQUENCE too.

For UPDATEs and INSERTs, the "proper" primary key also needs to be
checked, but keys are used for more than just checking uniqueness:
they're also often used in JOINs. Joining against a single integer
I'd think it quite a different proposition (I'd think faster in terms
of performance) than joining against, say, a text column or a
composite key.

Michael Glaesemann
grzm myrealbox com





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Leandro Guimarães Faria Corcete DUTRA
Дата:
Сообщение: Surrogate keys (Was: enums)
Следующее
От: Lukas Smith
Дата:
Сообщение: Re: Surrogate keys (Was: enums)