Subject | Re: [firebird-support] Why different Firebird instances have different read/fetches statistics |
---|---|
Author | |
Post date | 2014-06-11T14:50:26Z |
I managed to find the exact cause (in terms of SQL) of this difference.
I have simple update statement like
update contract set
total=total
where contract_number=5;
When I call this statement 2 times (in the same transaction) on the Windows server, then the number of reads for the second call can be even 0, at least it is not growing in comparison with the first all.
For Linux server it is completely different. First call of update gives normal number of reads (a bit more than for Windows server, but still less than 10 that is quite acceptable), but the second call of this update in the same transaction gives more than 100.000 reads and there is visible performance degradation.
Of course, my original SQL code is not so simple or trivial (assignment of the same field to itself), but it can be exactly proved (bu deleting other parts of code) that almost all of excessible reads are created in such a way.
It is really strange behavior. It is hard to imagine any kind of configuration that could result in such behaviour.
I have simple update statement like
update contract set
total=total
where contract_number=5;
When I call this statement 2 times (in the same transaction) on the Windows server, then the number of reads for the second call can be even 0, at least it is not growing in comparison with the first all.
For Linux server it is completely different. First call of update gives normal number of reads (a bit more than for Windows server, but still less than 10 that is quite acceptable), but the second call of this update in the same transaction gives more than 100.000 reads and there is visible performance degradation.
Of course, my original SQL code is not so simple or trivial (assignment of the same field to itself), but it can be exactly proved (bu deleting other parts of code) that almost all of excessible reads are created in such a way.
It is really strange behavior. It is hard to imagine any kind of configuration that could result in such behaviour.