Search Postgresql Archives

Embedded text column versus referenced text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux