Embedded text column versus referenced text

From: Rikard Bosnjakovic <rikard(dot)bosnjakovic(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Embedded text column versus referenced text
Date: 2010-08-04 15:05:47
Message-ID: AANLkTi=oSej+KXoLTQ49TKWJLr_WERdPPRRZw4Sy+QCT@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-08-04 15:12:15 Re: Danger of idiomatic plpgsql loop for merging data
Previous Message Gauthier, Dave 2010-08-04 14:50:02 Re: killing idle attaches without killing others