postgresql - 100 columns vs Array of length 100 -
i have table 100+ values corresponding each row, i'm exploring different ways store them.
without indexes, lose if store these 100 values in integer[]
column in postgresql? compared storing them in separate columns.
plus, since can add indexes array elemnets,
create index test_index on test ((foo[1]));
would there performance difference queries using such index compared regular index on column?
as far i've read, performance difference come picture in arrays variable length elements; i'm not sure fixed length ones.
don't go lazy way. if need store 100 , more values array, ok, if has sense has array application, data.
if need query specific element of array, design not good, regardless of performances, , must use columns. in moment must delete "column" in middle or redesign it.
anyway, wrote frank in comments, if values same type, consider model them table (if meaning same).
Comments
Post a Comment