浏览模式: 普通 | 列表
12月, 2013 | 1

MySQL 加锁处理分析,写得比较多

[ 2013-12-13 22:00:15 | 作者: admin ]
p.s.尚未验证不过非常值得借鉴

 
http://hedengcheng.com/?p=771



1 背景 1

1.1 MVCC:Snapshot Read vs Current Read 2

1.2 Cluster Index:聚簇索引 3

1.3 2PL:Two-Phase Locking 3

1.4 Isolation Level 4

2 一条简单SQL的加锁实现分析 5

2.1 组合一:id主键+RC 6

2.2 组合二:id唯一索引+RC 6

2.3 组合三:id非唯一索引+RC 7

2.4 组合四:id无索引+RC 8

2.5 组合五:id主键+RR 9

2.6 组合六:id唯一索引+RR 9
...

阅读全文…
1