pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jasper Potts <jasper@jasperpotts.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Select where id in (LARGE LIST) ?
Date: Wed, 03 Aug 2005 15:13:42 +1200
Message-ID: <42F03666.8070706@opencloud.com> (raw)
In-Reply-To: <26493.1123036776@sss.pgh.pa.us>
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>

Tom Lane wrote:
> Oliver Jowett <oliver@opencloud.com> 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



view thread (13+ messages)  latest in thread

Message-ID: <42F03666.8070706@opencloud.com>
Permalink:  ../42F03666.8070706@opencloud.com/
Also on:    postgresql.org/message-id/42F03666.8070706@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, tgl@sss.pgh.pa.us, jasper@jasperpotts.com
  Subject: Re: Select where id in (LARGE LIST) ?
  In-Reply-To: <42F03666.8070706@opencloud.com>
  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> <42F03666.8070706@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox