Re: Surrogate keys (Was: enums)

Поиск
Список
Период
Сортировка
От Leandro Guimarães Faria Corcete DUTRA
Тема Re: Surrogate keys (Was: enums)
Дата
Msg-id loom.20060118T140650-865@post.gmane.org
обсуждение исходный текст
Ответ на Re: enums  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: Surrogate keys (Was: enums)  (Martijn van Oosterhout <kleptog@svana.org>)
Re: Surrogate keys (Was: enums)  (Michael Glaesemann <grzm@myrealbox.com>)
Re: Surrogate keys (Was: enums)  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
Jim C. Nasby <jnasby <at> pervasive.com> writes:

> a) the optimizer does a really poor job on multi-column index statistics

So it should be fixed?

And there are a *lot* of singular, natural keys.


> b) If each parent record will have many children, the space savings from
> using a surrogate key can be quite large

Not such a common case.


> c) depending on how you view things, putting actual keys all over the
> place is denormalized

How come?  Never!


> Generally, I just use surrogate keys for everything unless performance
> dictates something else.

What I am proposing is the reverse: use natural keys for everything unless 
performance dictates something else.

In support of my PoV: 
http://blogs.ittoolbox.com/database/soup/archives/007327.asp?rss=1




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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Bad estimate on LIKE matching
Следующее
От: Leandro Guimarães Faria Corcete DUTRA
Дата:
Сообщение: Re: Surrogate keys (Was: enums)