well,the topic introduce Isolation in wikipedia have such words,links is here
………
Serializable
This is the highest isolation level.
With a lock-based concurrency control DBMS implementation, serializability requires read and write locks (acquired on selected data) to be released at the end of the transaction. Also range-locks must be acquired when a SELECT query uses a ranged WHERE clause, especially to avoid the phantom reads phenomenon (see below).
When using non-lock based concurrency control, no locks are acquired; however, if the system detects a write collision among several concurrent transactions, only one of them is allowed to commit. See snapshot isolation for more details on this topic.
but whole topic didn’t explain “range-locks”,google alse have no accurate description.
what’s “range-locks”,and which different with “read lock” and “write lock”?
thanks!
If you use a range in the
WHEREclause the database will lock each possible tuple in this range and also the next tuple (before and after). If there is no next tuple available in a direction it will lock completely in this direction.So the
SELECTis reliable within the transaction.