PostgreSQL large single transaction slower than multiple transaction -


on postgres, saw case there huge amount of selects being handled in single transaction. slow, solution break selects multiple transactions, dramatically improved query time.

has come across such case? seems counter intuitive , wondering if there technical reason why multiple transactions preferable?

my theory it's easier db maintain acid properties multiple transactions opposed single gargantuan transaction.

i wouldn't expect selects issue if there nothing writing database. there aren't locking issues there speak of in pure select statement. issues happen when there writes.

if have writes, have deal fact autovacuum cannot clean items written after oldest write transaction started.

if seeing issues this, critical investigate locks (in pg_locks) can queries , functions , find out these coming from.

keep in mind select not select , easy assume performance problems coming from.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -