Tim,

 

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.

 

Tnx.

 

Regards

Zoran

 

 

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

 

  

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

  


23.02.2016 16:03, 'Zoran' [email protected] <mailto:[email protected]>
[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]

Reply via email to