Re: "stack depth limit exceeded" executing DELETE FROM - Mailing list pgsql-jdbc

From AgentM
Subject Re: "stack depth limit exceeded" executing DELETE FROM
Date
Msg-id 8F44EB66-D8CE-4228-8AE7-C5500F6B5766@themactionfaction.com
Whole thread Raw
In response to Re: "stack depth limit exceeded" executing DELETE FROM  (Michael Fuhr <mike@fuhr.org>)
List pgsql-jdbc
On Sep 5, 2006, at 14:44 , Michael Fuhr wrote:

> On Tue, Sep 05, 2006 at 02:18:05PM -0400, Cox, Brian wrote:
>> The following fails with a "stack depth limit exceeded":
>>
>> DELETE FROM some-table WHERE pk IN (pk1, pk2, ..., pkN)
>>
>> where pk = primary key and N is large, may be > 50000.
>>
>> Is there some limit as to the number of rows that can
>> be deleted in a single DELETE?
>
> The error isn't due to the number of rows being deleted but rather
> from parsing the large number of items in the IN list.  See the
> following thread:
>
> http://archives.postgresql.org/pgsql-general/2006-01/msg00959.php

You have been receiving great advice from the other guys, but another
thing to try is to use some middleware to determine which ranges your
delete set covers and use WHERE pk BETWEEN x AND y, potentially
improving index usage performance.

-M

pgsql-jdbc by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: "stack depth limit exceeded" executing DELETE FROM
Next
From: Matt Chambers
Date:
Subject: Re: jdbc3, pg 8.1.4 , and stored procedures