Re: index usage on arrays

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: andrew klassen <aptklassen(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: index usage on arrays
Date: 2008-02-07 19:01:58
Message-ID: 8143.1202410918@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

andrew klassen <aptklassen(at)yahoo(dot)com> writes:
> Is there any alternative to what am I currently doing other than creating a row for
> each array element,

Since (I think) 8.2, you could create a GIN index on the array column
and then array overlap (&&) would be indexable. GIN has some
performance issues if the table is heavily updated, though.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Yonatan Ben-Nes 2008-02-08 12:12:09 Wrong number of rows estimation by the planner
Previous Message Oleg Bartunov 2008-02-07 18:55:44 Re: index usage on arrays