X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ED36D528B7 for ; Wed, 3 Aug 2005 00:14:00 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95028-04 for ; Wed, 3 Aug 2005 03:13:47 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 891215290F for ; Wed, 3 Aug 2005 00:13:46 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1E09hO-0005TG-Gk; Wed, 03 Aug 2005 15:13:42 +1200 Message-ID: <42F03666.8070706@opencloud.com> Date: Wed, 03 Aug 2005 15:13:42 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Jasper Potts , pgsql-jdbc@postgresql.org Subject: Re: Select where id in (LARGE LIST) ? References: <42EA4B90.4050606@jasperpotts.com> <1122651744.2837.196.camel@coppola.muc.ecircle.de> <42EA811B.10409@jasperpotts.com> <1122885611.2837.209.camel@coppola.muc.ecircle.de> <42EF3B8F.1020603@jasperpotts.com> <42EF4193.3020009@opencloud.com> <42EF7C7F.5000406@jasperpotts.com> <42F007BE.8040002@opencloud.com> <26493.1123036776@sss.pgh.pa.us> In-Reply-To: <26493.1123036776@sss.pgh.pa.us> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200508/16 X-Sequence-Number: 13585 Tom Lane wrote: > Oliver Jowett writes: > >>There may be a (backend) limit on the number of parameters in a query, >>not sure. > > > I'm pretty certain there's no hard limit. However, I doubt anyone has > tested with thousands of parameters ... there might well be performance > issues, such as loops that are O(N^2) in the number of parameters. > Feel free to send along problem cases. With a really big IN list (16384 triggered it, 8192 didn't) I get "ERROR: stack depth limit exceeded", though I guess this is more a limit in the handling of IN than a number-of-parameters limit per se. -O