Re: Are there performance advantages in storing bulky field in separate table?

Поиск
Список
Период
Сортировка
От Robert Treat
Тема Re: Are there performance advantages in storing bulky field in separate table?
Дата
Msg-id 200904081706.45004.xzilla@users.sourceforge.net
обсуждение исходный текст
Ответ на Re: Are there performance advantages in storing bulky field in separate table?  (Ian Mayo <ianmayo@tesco.net>)
Ответы Re: Are there performance advantages in storing bulky field in separate table?  (Sam Mason <sam@samason.me.uk>)
Re: Are there performance advantages in storing bulky field in separate table?  (Thomas Kellerer <spam_eater@gmx.net>)
Re: Are there performance advantages in storing bulky field in separate table?  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Список pgsql-general
On Wednesday 08 April 2009 15:30:28 Ian Mayo wrote:
> On Wed, Apr 8, 2009 at 8:13 PM, Robert Treat
>
> <xzilla@users.sourceforge.net> wrote:
> > Maybe I've been reading too much Pascal again lately, but if only 1% of
> > your rows are going to have data in this column, personally, I'd put it
> > in a separate table.
>
> thanks for that Robert - it does match my (completely groundless)
> first impression.
>
> In the nature of debate, would you mind passing on the pascal-related
> reasons why you'd put the data in another table?
>

You can be sure that discussion of this topic in this forum will soon be
visited by religious zealots, but the short answer is "nulls are bad, mmkay".
A slightly longer answer would be that, as a general rule, attributes of your
relations that only apply to 1% of the rows are better represented as a one
to N relationship using a second table. For a longer answer, see
http://www.databasedesign-resource.com/null-values-in-a-database.html
or http://www.dbazine.com/ofinterest/oi-articles/pascal27

--
Robert Treat
Conjecture: http://www.xzilla.net
Consulting: http://www.omniti.com

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

Предыдущее
От: Chris Browne
Дата:
Сообщение: Re: Are there performance advantages in storing bulky field in separate table?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: recovery after segmentation fault