Embedded text column versus referenced text

Поиск
Список
Период
Сортировка
От Rikard Bosnjakovic
Тема Embedded text column versus referenced text
Дата
Msg-id AANLkTi=oSej+KXoLTQ49TKWJLr_WERdPPRRZw4Sy+QCT@mail.gmail.com
обсуждение исходный текст
Ответы Re: Embedded text column versus referenced text  (Vick Khera <vivek@khera.org>)
Re: Embedded text column versus referenced text  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
I am in the design phase of a new db so I cannot test queries using
explain/analyze yet, but regarding performance, is there any
difference in doing this:

CREATE TABLE something (name text, age smallint, ...other columns...,
comment text);

compared to this:

CREATE TABLE comments (id serial primary key, comment text);
CREATE TABLE something (name text, age smallint, ...other columns...,
comment integer REFERENCES comments(id));

?

The comments field will be used here and there but I expect it will
most often be NULL.


--
- Rikard

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

Предыдущее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: killing idle attaches without killing others
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Danger of idiomatic plpgsql loop for merging data