Re: Select where id in (LARGE LIST) ?

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jasper Potts <jasper(at)jasperpotts(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Select where id in (LARGE LIST) ?
Date: 2005-08-03 03:13:42
Message-ID: 42F03666.8070706@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom Lane wrote:
> Oliver Jowett <oliver(at)opencloud(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-08-03 03:23:21 Re: Select where id in (LARGE LIST) ?
Previous Message Tom Lane 2005-08-03 02:39:36 Re: Select where id in (LARGE LIST) ?