Read Community isolation level
] Read Community ensures that the data read for transactions has been submitted before the transaction is visible. However, if the data is updated with the data and the same data is read again, the result is consistent.
Repertable Read isolated levelIn contrast, the Repeatable Read provides higher -level consistency. It not only guarantees that the data reads has been submitted, but also ensures that the data remains unchanged during the entire transaction. Even if other transactions are updated, the original reading results remain consistent.
Example
Considering the following scene, Table T contains a column C with a value of '1'.
begin transaction; Select * from t; WAITFOR Delay '00: 01: 00 '; Select * from t; Commit;
read committed:
The second select statement may return any updated or modified data because the data may change during the delay.BEGIN TRANSACTION;
SELECT * FROM T;
WAITFOR DELAY '00:01:00';
SELECT * FROM T;
COMMIT;
Snapshot: is similar to Serializable, but use snapshots to provide consistency without blocking concurrent transactions.
Select the right isolation level
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3