首页 > 应用开发 > IT综合 > Multiversion Concurrency Control (311)

Multiversion Concurrency Control (311)

原创 IT综合 作者:tsinglee 时间:2007-12-05 13:31:10 0 删除 编辑

Oracle automatically provides read consistency to a query so that all the data that the
query sees comes from a single point in time (statement-level read consistency).
Oracle can also provide read consistency to all of the queries in a transaction
(transaction-level read consistency).

Oracle uses the information maintained in its rollback segments to provide these
consistent views. The rollback segments contain the old values of data that have been
changed by uncommitted or recently committed transactions.

As a query enters the execution stage, the current system change number (SCN) is
determined. As data blocks are read on behalf of the query, only blocks written with the
observed SCN are used.Blocks with changed data (more recent SCNs) are reconstructed from
data in the rollback segments, and the reconstructed data is returned for the query.
Therefore,each query returns all committed data with respect to the SCN recorded at the
time that query execution began. Changes of other transactions that occur during a
query’s execution are not observed, guaranteeing that consistent data is returned for
each query.

1. Oracle 利用回滚段中的信息生成一个能保证一致性读的数据
2. 当查询进行执行阶段 , SCN是确定的 .
当查询进行扫描时 , 如果某个数据块内的数据被修改过 ,Oracle将使用回滚段中的信息重建此数据块
供查询使用 .
3. 查询的结果集只包含查询开始执行时就已经提交的数据。在查询执行时,其他事务修改的数据


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

上一篇: Hints : DRIVING_SITE
请登录后发表评论 登录
  • 博文量
  • 访问量