Re: single transaction vs multiple transactions

From: Sven Geisler <sgeisler(at)aeccom(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: single transaction vs multiple transactions
Date: 2006-12-05 15:35:19
Message-ID: 457591B7.80408@aeccom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Heikki Linnakangas 2006-12-05 15:42:57 Re: single transaction vs multiple transactions
Previous Message Heikki Linnakangas 2006-12-05 15:30:43 Re: single transaction vs multiple transactions