Replies: 3 comments 7 replies
-
This is not a place for discussion. If you want one - go to firebird-support mail list. |
Beta Was this translation helpful? Give feedback.
-
Hi Reis,
I have experience up to FB3.0
If you are starting read only READ COMMITED transaction, it is marked asap as commited and won’t stuck the garbage collection and will show you all later commited data too.
But be careful, read only SNAPSHOT won’t work, because that is a snapshot…
FB4.0 may changed. The global commit number appears there, which may affects this operation, but I have no experience with it. Maybe someone else has.
András
p.s. we used long running (for weeks) RORC transaction at least over 10 years
From: Reis ***@***.***>
Sent: Friday, July 8, 2022 11:15 AM
To: FirebirdSQL/firebird ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [FirebirdSQL/firebird] Transaction usage - best practices (Discussion #7228)
Transactions when used incorrectly can result in undesirable side-effects such as performance loss.
Recently I had a discussion with a friend about firebird transactions (and transactions in general).
My friend says it's ok to keep readonly transactions open for days. Generally, he prepares a statement and leaves it open until the on-premise software is closed by the user which might never happen or happen after a few long weeks if the user keeps his machine constantly active.
I think this is not a good strategy, specially because the on-premise software shares the same database with a web server that receives some important traffic and we quickly start noticing an important distance between oldest active and newest active.
What do you think about this? Is it ok to keep the read-only transaction open ? Or should read-only transactions be started when the need to query the data occurs?
—
Reply to this email directly, view it on GitHub<#7228>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOZGLFASA5PGRMG75NHEB7DVS7WRXANCNFSM53AKATKA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Keeping read-only transactions open for hours is especially not a good idea since Firebird 4.0, as the behaviour of READ COMMITTED transactions changed if you use the default settings. See also section Compatibility Issues, Read Consistency for READ COMMITTED transactions Used By Default in the Firebird 4.0 Release Notes. |
Beta Was this translation helpful? Give feedback.
-
Transactions when used incorrectly can result in undesirable side-effects such as performance loss.
Recently I had a discussion with a friend about firebird transactions (and transactions in general).
My friend says it's ok to keep
readonly transactions
open for days. Generally, he prepares a statement and leaves it open until theon-premise
software is closed by the user which might never happen or happen after a few long weeks if the user keeps his machine constantly active.I think this is not a good strategy, specially because the on-premise software shares the same database with a web server that receives some important traffic and we quickly start noticing an important distance between
oldest active
andnewest active
.What do you think about this? Is it ok to keep the read-only transaction open ? Or should read-only transactions be started when the need to query the data occurs?
Beta Was this translation helpful? Give feedback.
All reactions