From: | Tom Allison <tom(at)tacocat(dot)net> |
---|---|
To: | General PostgreSQL List <pgsql-general(at)postgresql(dot)org> |
Subject: | arrays in where |
Date: | 2007-05-28 22:28:09 |
Message-ID: | BF87B3F1-3E0B-4EB5-892C-3AFA579D580A@tacocat.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have a table....
select * from history;
idx | tokens
-----+---------------------
2 | {10633,10634,10636}
And the values in the tokens field are taken from sequence values
from another table.
Can I use this kind of storage to identify all the tokens in the
first table that make these token_idx values?
Normally I would store these under a table with a structure like:
2 | 10633
2 | 10634
2 | 10636
as a "join table"
and simply join all these rows together.
but I'm curious if I can use the ARRAY and if it might save me some
performance because this join table would also have a lot of
redundant data...
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2007-05-28 23:01:47 | Re: SQL Manager 2007 for PostgreSQL released |
Previous Message | Michael Fuhr | 2007-05-28 22:18:09 | Re: Possible DB corruption |