Subject | Re: [firebird-support] READ ONLY READ COMMITTED and consistency |
---|---|
Author | Michael Ludwig |
Post date | 2010-05-16T15:34:34Z |
Ann W. Harrison schrieb am 16.05.2010 um 10:54:04 (-0400):
*statement* would be atomic with regard to other commits, i.e. it would
either read all new record versions created by the commit, or none of
them. And newly committed record versions then becoming available for
the next *statement* in the ongoing transaction.
But it sounds as if there is no such statement isolation, and if I think
about it, well, it makes sense, as the output of one statement within a
transaction might well become the input for the next statement.
Thanks!
--
Michael Ludwig
> Michael Ludwig wrote:Well, I was wondering whether in READ COMMITTED mode maybe one SELECT
> > In a transaction configured with READ ONLY READ COMMITTED, is it
> > possible to see just part of a commit?
>
> Yes, of course. That's what the READ COMMITTED mode does - reads
> the most recent version of a record at the time of the read.
*statement* would be atomic with regard to other commits, i.e. it would
either read all new record versions created by the commit, or none of
them. And newly committed record versions then becoming available for
the next *statement* in the ongoing transaction.
But it sounds as if there is no such statement isolation, and if I think
about it, well, it makes sense, as the output of one statement within a
transaction might well become the input for the next statement.
> If you read the same record twice, you may see different values.Good, I'll remember to avoid READ COMMITTED when consistency matters.
> If you count the same set of records twice, you may get different
> numbers. That's why I recommend REPEATABLE READ, which, in
> Firebird is not only repeatable, but excludes phantoms.
Thanks!
--
Michael Ludwig