詳解oracle事務隔離級別 |
發布時間: 2012/7/13 14:56:54 |
oracle事務隔離級別是學習oracle數據庫過程中不能不提到的,下面就為您詳細介紹oracle事務隔離級別方面的知識,供您參考。
隔離級別(isolation level) oracle事務隔離級別定義了事務與事務之間的隔離程度。 oracle事務隔離級別與并發性是互為矛盾的:隔離程度越高,數據庫的并發性越差;隔離程度越低,數據庫的并發性越好。 ANSI/ISO SQL92標準定義了一些數據庫操作的隔離級別: 未提交讀(read uncommitted) 提交讀(read committed) 重復讀(repeatable read) 序列化(serializable) 通過一些現象,可以反映出隔離級別的效果。這些現象有: 更新丟失(lost update):當系統允許兩個事務同時更新同一數據是,發生更新丟失。 臟讀(dirty read):當一個事務讀取另一個事務尚未提交的修改時,產生臟讀。 非重復讀(nonrepeatable read):同一查詢在同一事務中多次進行,由于其他提交事務所做的修改或刪除,每次返回不同的結果集,此時發生非重復讀。(A transaction rereads data it has previously read and finds that another committed transaction has modified or deleted the data. ) 幻像(phantom read):同一查詢在同一事務中多次進行,由于其他提交事務所做的插入操作,每次返回不同的結果集,此時發生幻像讀。(A transaction reexecutes a query returning a set of rows that satisfies a search condition and finds that another committed transaction has inserted additional rows that satisfy the condition. ) 本文出自:億恩科技【www.ypdoo.com.cn】 |