Savepoints in transactions for speed?

Поиск
Список
Период
Сортировка
От Mike Blackwell
Тема Savepoints in transactions for speed?
Дата
Msg-id CANPAkgs_LvZV-fabTNN-ahiVcwSBAyOnArw1v+QbCePg7on6ZA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Savepoints in transactions for speed?  (Richard Huxton <dev@archonet.com>)
Re: Savepoints in transactions for speed?  (Steve Atkins <steve@blighty.com>)
Re: Savepoints in transactions for speed?  (Bob Lunney <bob_lunney@yahoo.com>)
Re: Savepoints in transactions for speed?  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-performance
I need to delete about 1.5 million records from a table and reload it in one transaction.  The usual advice when loading with inserts seems to be group them into transactions of around 1k records.  Committing at that point would leave the table in an inconsistent state.  Would issuing a savepoint every 1k or so records negate whatever downside there is to keeping a transaction open for all 1.5 million records, or just add more overhead?

The data to reload the table is coming from a Perl DBI connection to a different database (not PostgreSQL) so I'm not sure the COPY alternative applies here.

Any suggestions are welcome.


Mike

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Postgres configuration for 8 CPUs, 6 GB RAM
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Savepoints in transactions for speed?