Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 781009FB6EB for ; Thu, 10 May 2007 15:42:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 68124-07 for ; Thu, 10 May 2007 15:42:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id E52389FB55D for ; Thu, 10 May 2007 15:42:49 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 9E4FA30909; Thu, 10 May 2007 20:42:48 +0200 (MET DST) From: Lukas Kahwe Smith X-Newsgroups: pgsql.hackers Subject: Re: Planning large IN lists Date: Thu, 10 May 2007 14:42:40 -0400 Organization: Hub.Org Networking Services Lines: 14 Message-ID: <464367A0.9010003@pooteeweet.org> References: <1178821226.6034.63.camel@goldbach> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Neil Conway User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) In-Reply-To: <1178821226.6034.63.camel@goldbach> To: pgsql-hackers@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/453 X-Sequence-Number: 103055 Neil Conway wrote: > Clearly, the current approach is fine when the array is small -- perhaps > for arrays above a certain number of elements, we could switch to > randomly sampling array elements, estimating their selectivities, and > then using that information to infer the estimated selectivity of the > entire array expression. That seems fairly crude, though: does anyone > have any better ideas? Optimizer hints in SQL /me ducks and runs for cover. regards, Lukas