in reply to Re: Posgres batch read with DBI? - ( PostgreSQL )
in thread Posgres batch read with DBI?
With my DBA hat on, I encourage running the program as ONE transaction with auto-commit off. That way, if there is an error after 249k rows, Postgres will rollback the entire transaction and your data will be unchanged and unharmed. Also other clients will not see the in-process transaction and will get a consistent view of the data.
Break up the transaction only if testing and benchmarks demonstrate a real problem. “Premature optimization is the root of all evil.”
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Posgres batch read with DBI? - ( PostgreSQL )
by Marshall (Canon) on Jan 30, 2021 at 05:37 UTC |
In Section
Seekers of Perl Wisdom