Savepoints in transactions for speed?

Поиск
Список
Период
Сортировка
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?