Savepoints in transactions for speed? - Mailing list pgsql-performance

From Mike Blackwell
Subject Savepoints in transactions for speed?
Date
Msg-id CANPAkgs_LvZV-fabTNN-ahiVcwSBAyOnArw1v+QbCePg7on6ZA@mail.gmail.com
Whole thread Raw
Responses Re: Savepoints in transactions for speed?
Re: Savepoints in transactions for speed?
Re: Savepoints in transactions for speed?
Re: Savepoints in transactions for speed?
List 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 by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Postgres configuration for 8 CPUs, 6 GB RAM
Next
From: Richard Huxton
Date:
Subject: Re: Savepoints in transactions for speed?