Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 24C259FA354 for ; Thu, 8 Feb 2007 13:34:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 61977-04 for ; Thu, 8 Feb 2007 13:34:29 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 508919FA30A for ; Thu, 8 Feb 2007 13:34:30 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l18HYRXv027206; Thu, 8 Feb 2007 12:34:28 -0500 (EST) To: "Ezequias Rodrigues da Rocha" cc: Joe , pgsql-sql@postgresql.org Subject: Re: Open a Transaction In-reply-to: <55c095e90702080913k5a769f28x8946f252f02571cb@mail.gmail.com> References: <55c095e90702080850re95fc47j95afdea67579c933@mail.gmail.com> <1170953767.697.44.camel@pampa> <55c095e90702080913k5a769f28x8946f252f02571cb@mail.gmail.com> Comments: In-reply-to "Ezequias Rodrigues da Rocha" message dated "Thu, 08 Feb 2007 15:13:16 -0200" Date: Thu, 08 Feb 2007 12:34:27 -0500 Message-ID: <27204.1170956067@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/99 X-Sequence-Number: 27433 "Ezequias Rodrigues da Rocha" writes: > Now the sql is OK but now I have the following error: > ERROR: stack depth limit exceeded > SQL state: 54001 > Hint: Increase the configuration parameter "max_stack_depth". > In the previous e-mail I hide the numbers of itens of my set > (in(234,12332,1232,....) actually I have more than 36000 subsets of my IN > statement. That's probably well past the point at which you should expect IN (list) to give reasonable performance. Instead consider putting the values into a temp table and writing a join or IN (subselect) against the temp table. regards, tom lane