Subject RE: [firebird-support] firebird and transaction behaviour questions
Author Zoran

Ah. thank you for clarifying this. I always try to do select for a report in
one select statement with joints etc. In the scenario you described below -
yes, we need a transaction.




Sent: Tuesday, February 23, 2016 10:43 AM
Subject: Re: [firebird-support] firebird and transaction behaviour questions

On 23/02/2016 15:38, 'Zoran' zoran565@... <mailto:zoran565@...>
[firebird-support] wrote:

23.02.2016 16:03, 'Zoran' zoran565@... <mailto:zoran565@...>
[firebird-support] wrote:
>> Why would you use transaction for select statements?

> For data consistency. People like consistent data in reports.

If other clients are using transactions properly (when updating multiple
rows), database should be in a stable state.

In the following sequence:

- you do a SELECT
- some other transaction commits
- you do another SELECT
- you build a report with the results from the two SELECTs

you can get inconsistent results in your report unless your two SELECTs are
in a transaction.

Using transactions when not needed (in my opinion - and I am no expert in
Firebird) just add an overhead to the server.

If the database designers have chosen that everything is always done in a
transaction then that's how it works - there's no overhead because there's
no concept of doing anything without a transaction.

Tim Ward

[Non-text portions of this message have been removed]