X-Original-To: pgsql-performance@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 467D5925B13 for ; Wed, 28 May 2003 16:26:55 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 31738-01 for ; Wed, 28 May 2003 16:26:54 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by developer.postgresql.org (Postfix) with SMTP id 62793925B0E for ; Wed, 28 May 2003 16:26:54 -0400 (EDT) Received: (qmail 6717 invoked by uid 500); 28 May 2003 20:29:05 -0000 Date: Wed, 28 May 2003 15:29:05 -0500 From: Bruno Wolff III To: Dave Tenny Cc: Shridhar Daithankar , pgsql-performance@postgresql.org Subject: Re: IN list processing performance (yet again) Message-ID: <20030528202905.GC6655@wolff.to> Mail-Followup-To: Dave Tenny , Shridhar Daithankar , pgsql-performance@postgresql.org References: <3ED4B0E5.3050703@attbi.com> <200305281846.38928.shridhar_daithankar@nospam.persistent.co.in> <3ED4F8B6.7030905@attbi.com> <20030528184150.GB6118@wolff.to> <3ED5185D.2000102@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ED5185D.2000102@attbi.com> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/250 X-Sequence-Number: 2029 On Wed, May 28, 2003 at 16:13:17 -0400, Dave Tenny wrote: > Bruno Wolff III wrote: > > I assume you mean something like: > > test=# select million.id, million.val from million, (select 10000 as a > union select 20000 as a) t2 where million.id = t2.a; > id | val > -------+------- > 10000 | 0 > 20000 | 10000 > (2 rows) > > Ouch! That's deviant. Haven't tried it yet and I cringe at the > thought of it, but I might take a run at it. However that's going to > run up the buffer space quickly. That was one of my as yet unsnaswered > questions, what is the pragmatic buffer size limit > for queries? That is what I was referring to. I have used this in some cases where I knew the list was small and I wanted to do a set difference without loading a temporary table. Or to do an insert of multiple rows with one insert statement. > I'm /really/ hoping we'll come up with something better, like an > understanding of why IN lists are non-linear in the first > place when the column is indexed, and whether it's fixable through some > other means or whether it's a bug that should be fixed. It also might be worth seeing if the development version is going to speed things up for you. Beta is one month away. My guess is that the production release will be in September.