版本一致性基于事务还是语句

By   2016-01-14  

实验过程如下:
创建表:

创建存储过程P1

创建实验数据:

模拟事务操作:

向表中插入新数据:

事务执行完毕:

查询表数据:

结论:

ORACLE 的多版本一致性是基于语句的,不是基于事务的。

正如某书籍中描述的一样:

READ COMMITTED

Enforces serialization at the statement level. This means that every statement will get a consistent view of the data as it existed at the start of that statement. However,since a transaction can contain more than one statement, it’s possible that nonrepeatable reads and phantom reads can occur within the context of the complete transaction. The READ COMMITTED isolation level is the default isolation level for Oracle.

SERIALIZABLE

Enforces serialization at the transaction level. This means that every statement within a transaction will get the same consistent view of the data as it existed at the start of the transaction

One Comment on “版本一致性基于事务还是语句

  1. 王昱

    请问,你这篇文章#https://blog.csdn.net/yidian815/article/details/16891021#中提到的大师的实验过程或链接可否给我一个,感谢,我的邮箱是15901513615@163.com

发表评论

邮箱地址不会被公开。