Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第七章:書中關於 SQL Server 快照隔離的小錯誤? - Sam #89

Open
samwu4166 opened this issue Jul 27, 2022 · 1 comment
Open
Labels
question Further information is requested

Comments

@samwu4166
Copy link

裡面提到快照隔離沒有辦法避免 Write Skew & Phantom Read,並提到:

不幸的是,在一些快照隔離的實現中,自動檢測丟失更新對此並沒有幫助。在 PostgreSQL 的可重複讀,MySQL/InnoDB 的可重複讀,Oracle 可序列化或 SQL Server 的快照隔離級別中,都不會自動檢測寫入偏差【23】。自動防止寫入偏差需要真正的可序列化隔離 ...

但是其實在 2019 SQL Server 中,快照隔離已經預設有 optimistic concurrency & select statement lock 的支援 XD (也就是文中的 SSI)

Snapshot isolation uses an optimistic concurrency model. If a snapshot transaction attempts to commit modifications to data that has changed since the transaction began, the transaction will roll back and an error will be raised. You can avoid this by using UPDLOCK hints for SELECT statements that access data to be modified.

ref: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server

不知道還有沒有 DB 是在這本書(2017)寫完後有比較大的 Isolation 改變!?

@kylemocode kylemocode added the question Further information is requested label Jul 27, 2022
@jxiu0129
Copy link

pg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants