Re: [GENERAL] Difference between array column type and separate table

2009-05-03 Thread Ron Mayer
Alban Hertroys wrote: > On May 2, 2009, at 9:33 AM, Mike Christensen wrote: > >> ... >> create table Threads ( ... Tags int2[], ...); >> >> To me this seems cleaner, but I'm wondering about performance. If I >> had millions of threads, is a JOIN going to be faster? ... > > ...I don't think ar

Re: [GENERAL] Difference between array column type and separate table

2009-05-02 Thread Mike Christensen
Yeah I talked with some other SQL guru friends of mine and they all agree the separate table is the way to go for a number of reasons, so that's what I'll stick with. It was just one of those things where you see a new feature and try to find an excuse to try it out Thanks! Mike On Sat, May 2, 2

Re: [GENERAL] Difference between array column type and separate table

2009-05-02 Thread Alban Hertroys
On May 2, 2009, at 9:33 AM, Mike Christensen wrote: Using this, I could completely get rid of ThreadTags and have a table like this: create table Threads ( Id uuid not null, Posted timestamp not null, Subject varchar(255) not null, Replies int4 not null, PosterId uuid not null,

[GENERAL] Difference between array column type and separate table

2009-05-02 Thread Mike Christensen
Let's say you have a table called Threads, and each thread can have zero or more "tags" associated with it. A tag is just a byte which maps to some enum somewhere. There's two ways I can think of to do this. The first would be to have: create table Threads ( Id uuid not null, Posted timesta

[GENERAL] Difference between array column type and separate table

2009-05-02 Thread Mike Christensen
Let's say you have a table called Threads, and each thread can have zero or more "tags" associated with it. A tag is just a byte which maps to some enum somewhere. There's two ways I can think of to do this. The first would be to have: create table Threads ( Id uuid not null, Posted timesta