Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DE1239FA1DE for ; Tue, 5 Dec 2006 11:35:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 85053-09 for ; Tue, 5 Dec 2006 11:35:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.aeccom.com (port-83-236-156-26.static.qsc.de [83.236.156.26]) by postgresql.org (Postfix) with ESMTP id 1F11D9FA18C for ; Tue, 5 Dec 2006 11:35:24 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.aeccom.com (Postfix) with ESMTP id 9A3D11CBE9; Tue, 5 Dec 2006 16:35:22 +0100 (CET) Received: from mail.aeccom.com ([127.0.0.1]) by localhost (gate6.aeccom.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03792-02-10; Tue, 5 Dec 2006 16:35:21 +0100 (CET) Received: from [192.168.2.140] (andes.core.aeccom.com [192.168.2.140]) by mail.aeccom.com (Postfix) with ESMTP id D11B91CBE8; Tue, 5 Dec 2006 16:35:21 +0100 (CET) Message-ID: <457591B7.80408@aeccom.com> Date: Tue, 05 Dec 2006 16:35:19 +0100 From: Sven Geisler Organization: AEC/communications GmbH User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-performance@postgresql.org Subject: Re: single transaction vs multiple transactions References: <45758FBF.2030404@aeccom.com> <457590A3.2090006@enterprisedb.com> In-Reply-To: <457590A3.2090006@enterprisedb.com> X-Enigmail-Version: 0.94.1.2 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at aeccom.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.045 tagged_above=0 required=5 tests=AWL, BAYES_40, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200612/79 X-Sequence-Number: 22135 Hi Heikki Heikki Linnakangas schrieb: > Sven Geisler wrote: >> I have to refactoring a 'DELETE FROM x WHERE y IN (...)' because IN got >> to much parameters. => 'stack depth limit exceeded' >> I don't want to increase just the parameter for max_stack_depth. It is >> better to refactoring because the number of arguments to IN may increase >> in the future. [...] >> >> BTW: The arguments are generate in the application tier. I would have to >> create a temporary table which I can use in 'DELETE FROM x WHERE y IN >> (SELECT z FROM tmp)'. > > I think that's exactly what you should do. I have to insert my arguments to a temporary table first, because the arguments are only known in the application tier. Is a multiple insert to a temporary table and a final 'DELETE FROM x WHERE y IN (SELECT z FROM tmp)' faster than multiple deletes? Sven.