pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Indexing array columns.
2+ messages / 2 participants
[nested] [flat]

* Indexing array columns.
@ 2005-11-21 16:14  Joshua Marsh <icub3d@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Joshua Marsh @ 2005-11-21 16:14 UTC (permalink / raw)
  To: pgsql-admin

I've been searching the manual looking for information about the effects of
indexing an array column but haven't found any information as of yet.

Does anyone have any information on how the indexes work for arrayed
columns?

Does/Can the index track each element in the array, or does it track only
the array as a whole?

How can I increase the speed of a query like: SELECT * FROM table WHERE 123
= ANY(array_of_ints); ?

Thanks,

Josh

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Indexing array columns.
@ 2005-11-21 19:15  Joe Conway <mail@joeconway.com>
  parent: Joshua Marsh <icub3d@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Joe Conway @ 2005-11-21 19:15 UTC (permalink / raw)
  To: Joshua Marsh <icub3d@gmail.com>; +Cc: pgsql-admin

Joshua Marsh wrote:
> Does/Can the index track each element in the array, or does it track 
> only the array as a whole? 

Built in index support works on the array as a whole, not the individual 
elements.

> How can I increase the speed of a query like: SELECT * FROM table WHERE 
> 123 = ANY(array_of_ints); ?

See contrib/intarray.

Joe



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-11-21 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-21 16:14 Indexing array columns. Joshua Marsh <icub3d@gmail.com>
2005-11-21 19:15 ` Joe Conway <mail@joeconway.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox