首页 > 数据库 > Oracle > Statement-Level Read Consistency (312)

Statement-Level Read Consistency (312)

原创 Oracle 作者:tsinglee 时间:2007-12-05 13:32:42 0 删除 编辑

Oracle always enforces statement-level read consistency. This guarantees that all the
data returned by a single query comes from a single point in time—the time that the
query began. Therefore, a query never sees dirty data or any of the changes made by
transactions that commit during query execution. As query execution proceeds, only
data committed before the query began is visible to the query. The query does not see
changes committed after statement execution begins.

A consistent result set is provided for every query, guaranteeing data consistency, with
no action on the user’s part. The SQL statements SELECT, INSERT with a subquery,
UPDATE, and DELETE all query data, either explicitly or implicitly, and all return
consistent data. Each of these statements uses a query to determine which data it will
affect (SELECT, INSERT, UPDATE, or DELETE, respectively).

A SELECT statement is an explicit query and can have nested queries or a join
operation. An INSERT statement can use nested queries. UPDATE and DELETE
statements can use WHERE clauses or subqueries to affect only some rows in a table
rather than all rows.

Queries used in INSERT, UPDATE, and DELETE statements are guaranteed a consistent
set of results. However, they do not see the changes made by the DML statement itself.
In other words, the query in these operations sees data as it existed before the
operation began to make changes.

1. 语句级一致性读 : 保证单一查询的结果集来自一个时间点--查询开始执行的时间.
2. 这个查询的结果集不包含脏数据及此查询执行时其他事务提交的数据。


来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
  • 博文量
  • 访问量