Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

arrays in where



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...



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group