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 BAEF59235B3 for ; Wed, 28 May 2003 14:39:40 -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 07634-01 for ; Wed, 28 May 2003 14:39:39 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by developer.postgresql.org (Postfix) with SMTP id 53B389235B0 for ; Wed, 28 May 2003 14:39:38 -0400 (EDT) Received: (qmail 6158 invoked by uid 500); 28 May 2003 18:41:50 -0000 Date: Wed, 28 May 2003 13:41:50 -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: <20030528184150.GB6118@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ED4F8B6.7030905@attbi.com> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/245 X-Sequence-Number: 2024 On Wed, May 28, 2003 at 13:58:14 -0400, Dave Tenny wrote: > A join isn't an option, these elements come a a selection of entity ID's > that are specific to some client context. > Some other people suggested joins too. You can union the values together and then join (or use where exists) with the result. This may not be faster and you may not be able to union several thousand selects together in a single statement. But it shouldn't be too much work to test it out.