single transaction vs multiple transactions

Поиск
Список
Период
Сортировка
От Sven Geisler
Тема single transaction vs multiple transactions
Дата
Msg-id 45758FBF.2030404@aeccom.com
обсуждение исходный текст
Ответы Re: single transaction vs multiple transactions  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Re: single transaction vs multiple transactions  ("Jens Schipkowski" <jens.schipkowski@apus.co.at>)
Список pgsql-performance
Hi,

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.

My approach is to do multiple 'DELETE FROM x WHERE y=...'.

My question is now, what is better for PostgreSQL from a performance
perspective?
1. all multiple deletes in one transaction
2. each delete in its own transaction

The number of arguments is around 10,000.

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)'.

Cheers
Sven

В списке pgsql-performance по дате отправления:

Предыдущее
От: Michael Stone
Дата:
Сообщение: Re: Bad iostat numbers
Следующее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: single transaction vs multiple transactions