Keeping a transaction open for that long is arguably a bad idea. You might need a consistent snapshot, but the cost is significant.
Also, paginating inefficiently with OFFSET is a problem is general. Even if you’re keeping a long transaction open, you can make it last less by optimising the read queries.
Keeping a transaction open for that long is arguably a bad idea. You might need a consistent snapshot, but the cost is significant.
Also, paginating inefficiently with OFFSET is a problem is general. Even if you’re keeping a long transaction open, you can make it last less by optimising the read queries.
This is actually a pretty interesting post about databases.