Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B93F79F9A5E for ; Thu, 23 Aug 2007 04:46:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43267-09 for ; Thu, 23 Aug 2007 04:46:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.trinitydigital.com.au (mail.trinitydigital.com.au [202.134.38.99]) by postgresql.org (Postfix) with ESMTP id B7F049F9980 for ; Thu, 23 Aug 2007 04:46:24 -0300 (ADT) Received: from [172.17.73.17] (C-59-101-146-253.mel.connect.net.au [59.101.146.253]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.trinitydigital.com.au (Postfix) with ESMTP id 6E3F39B9E; Thu, 23 Aug 2007 17:46:05 +1000 (EST) Message-ID: <46CD3A64.9050302@pws.com.au> Date: Thu, 23 Aug 2007 17:42:28 +1000 From: Russell Smith User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Michael Glaesemann CC: Stephen Davies , pgsql-performance@postgresql.org Subject: Re: Optimising "in" queries References: <200708221210.36770.scldad@sdc.com.au> <46CC16F3.7060606@pws.com.au> <46CD3869.90600@pws.com.au> In-Reply-To: <46CD3869.90600@pws.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/258 X-Sequence-Number: 26388 Russell Smith wrote: > > Filter: (sensor_id = ANY ('{1137,1138,1139,1140}'::integer[])) > > I've never seen this plan item except for when array's are involved. I > could be wrong. I'd like to know how this is generated when you don't > have an array. > I have just discovered that PG 8.2 will turn an IN clause into an array search instead of an OR list. Sorry all. Regards Russell Smith