File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ a3406db9ae7144d17eb7df5bffe8b70bb5dd06b8 127.0.0.1:7002@17002 master - 0 1584428
509
509
510
510
#### 方案二:一致性哈希分区
511
511
512
- 一致性哈希算法将 ** 整个哈希值空间** 组织成一个虚拟的圆环,范围是 * [ 0 - 2<sup >32 - 1 </sup >] * ,对于每一个数据,根据 ` key ` 计算 hash 值,确数据在环上的位置,然后从此位置沿顺时针行走,找到的第一台服务器就是其应该映射到的服务器:
512
+ 一致性哈希算法将 ** 整个哈希值空间** 组织成一个虚拟的圆环,范围是 * [ 0 , 2<sup >32</sup >-1 ] * ,对于每一个数据,根据 ` key ` 计算 hash 值,确数据在环上的位置,然后从此位置沿顺时针行走,找到的第一台服务器就是其应该映射到的服务器:
513
513
514
514
![ ] ( https://upload-images.jianshu.io/upload_images/7896890-40e8a2c096c8da92.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240 )
515
515
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ B+树是有序的,在这种范围查询中,优势非常大,直接遍历比
49
49
50
50
** 一张数据表有只能有一个主键,并且主键不能为null,不能重复。**
51
51
52
- ** 在mysql的InnoDB的表中,当没有显示的指定表的主键时,InnoDB会自动先检查表中是否有唯一索引的字段,如果有,则选择改字段为默认的主键 ,否则InnoDB将会自动创建一个6Byte的自增主键。**
52
+ ** 在mysql的InnoDB的表中,当没有显示的指定表的主键时,InnoDB会自动先检查表中是否有唯一索引的字段,如果有,则选择该字段为默认的主键 ,否则InnoDB将会自动创建一个6Byte的自增主键。**
53
53
54
54
### 二级索引(辅助索引)
55
55
** 二级索引又称为辅助索引,是因为二级索引的叶子节点存储的数据是主键。也就是说,通过二级索引,可以定位主键的位置。**
You can’t perform that action at this time.
0 commit comments