Subject Re: [firebird-support] READ ONLY READ COMMITTED and consistency
Author Michael Ludwig
Ann W. Harrison schrieb am 16.05.2010 um 10:54:04 (-0400):

> Michael Ludwig wrote:
> > 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.

Well, I was wondering whether in READ COMMITTED mode maybe one SELECT
*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.
> 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.

Good, I'll remember to avoid READ COMMITTED when consistency matters.
Michael Ludwig