You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: architecture/mysql.md
+63-3Lines changed: 63 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -326,7 +326,7 @@ EXPLAIN 中的很多额外的信息会在 Extra 字段显示,常见的有以
326
326
327
327
- Using where
328
328
329
-
列数据是从仅仅使用了索引中的信息而没有读取实际的行动的表返回的,这发生在对表的全部的请求列都是同一个索引的部分的时候,表示 MySQL 服务器将在存储引擎检索行后再进行过滤。
329
+
列数据是从仅仅使用了索引中的信息而没有读取实际行的表返回的,这发生在对表的全部的请求列都是同一个索引的部分的时候,表示 MySQL 服务器将在存储引擎检索行后再进行过滤。
330
330
331
331
332
332
## 锁总结
@@ -349,7 +349,22 @@ EXPLAIN 中的很多额外的信息会在 Extra 字段显示,常见的有以
349
349
读写分离可以提高系统的效率,特别是对于写少读多的系统,使用读写分离可以大大提高系统的效率。这也是从库会有多个的原因,读的时候可以做负载均衡(可以通过主健或者用户 id 等 hash 的方式,也可以使用 Round Robin 轮询算法;负载均衡算法有很多种,这里就不一一列举),让读请求分布到不同的从库上,提高读请求的效率。
350
350
351
351
## 主从复制
352
-
基于主从复制可以实现高可用。也可以避免单点失效问题。
352
+
- 数据分布
353
+
- 负载平衡(Load Balancing)
354
+
- 备份
355
+
- 高可用性(High Availability)和容错
356
+
357
+
### 相关命令
358
+
- show status 查看整个 mysql 状态,这个命令也可以看到 Seconds_Behind_Master。
0 commit comments