Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 906672E4410 for ; Thu, 7 Feb 2008 15:02:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 13110-07-3 for ; Thu, 7 Feb 2008 15:02:06 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 9BDC02E3A29 for ; Thu, 7 Feb 2008 15:01:59 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m17J1wCx008144; Thu, 7 Feb 2008 14:01:58 -0500 (EST) To: andrew klassen cc: pgsql-performance@postgresql.org Subject: Re: index usage on arrays In-reply-to: <60380.61376.qm@web37305.mail.mud.yahoo.com> References: <60380.61376.qm@web37305.mail.mud.yahoo.com> Comments: In-reply-to andrew klassen message dated "Thu, 07 Feb 2008 10:38:52 -0800" Date: Thu, 07 Feb 2008 14:01:58 -0500 Message-ID: <8143.1202410918@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/90 X-Sequence-Number: 28632 andrew klassen 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