当前位置:网站首页>ShardingSphere之分库分表概念介绍(二)
ShardingSphere之分库分表概念介绍(二)
2022-07-28 08:50:00 【融极】
概述
什么是分库分表
- 数据数量是不可控的,随着时间和业务发展,造成表里面数据越来越多,如果再去对数据库表CURD操作时,就会有性能问题。
解决方案
为了解决由于数据量过大而造成数据库性能降低问题,主要有下面两种方案。
- 方案1:从硬件上提高性能,比如CPU,磁盘。
- 方案2:分库分表。

垂直拆分
垂直分表
操作数据库中某张表,把这张表中一部分字段数据存到一张新表里面,再把这张表另一部分字段数据存到另外一张表中。
垂直分库
把单一数据库按照业务进行划分,专库专表。
水平拆分
水平分库

水平分表

分库分表应用和问题
应用
- 在数据库设计的时候考虑垂直分库和垂直分表。
- 随着数据库数据量增加,不要马上考虑水平切分,首先考虑缓存处理,读写分离,使用索引等方式,如果这些方式不能根本解决问题了,再考虑做水平分库和水平分表。
分库分表问题
- 跨节点连接查询问题(分页、排序等)。
- 多数据源管理问题。
总结
垂直拆分,拆分出来的数据结构是不同的。
水平拆分,拆分出来的数据结构相同。
边栏推荐
- 12 common design ideas of design for failure
- IP protocol of network layer
- Force deduction question (1) -- sum of two numbers
- Alibaba cloud server setup and pagoda panel connection
- LeetCode_406_根据身高重建队列
- Send a message to the background when closing the page
- canvas常用原型方法及绘制图片应用
- 2022安全员-C证特种作业证考试题库及答案
- Mysql5.7.38 start keepalived in the container
- What is the difference between these two sets of code?
猜你喜欢

376. 摆动序列【贪心、动态规划------】
![【解决】ERROR in [eslint] ESLint is not a constructor](/img/58/2ce1243d0085462af3ba6d3da0817d.png)
【解决】ERROR in [eslint] ESLint is not a constructor

个人博客小程序
![Magic brace- [group theory] [Burnside lemma] [matrix fast power]](/img/cf/606d1bc7cd877771afbdd7640b718c.png)
Magic brace- [group theory] [Burnside lemma] [matrix fast power]

2022年安全员-B证考试模拟100题及答案

12 common design ideas of design for failure

正负数值的正则表达式
![[swintransformer source code reading II] window attention and shifted window attention](/img/fb/5273d87fed66c75a92aec8e94980a3.png)
[swintransformer source code reading II] window attention and shifted window attention

golang升级到1.18.4版本 遇到的问题

Machine learning: self paced and fine tuning
随机推荐
Get started quickly with flask (I) understand the framework flask, project structure and development environment
5 运算符、表达式和语句
376. Swing sequence [greedy, dynamic planning -----]
[swintransformer source code reading II] window attention and shifted window attention
【vscode】vscode使用
2022 safety officer-b certificate examination simulated 100 questions and answers
Realize batch data enhancement | use of keras imagedatagenerator
技术分享| 快对讲综合调度系统
【SwinTransformer源码阅读二】Window Attention和Shifted Window Attention部分
Code management platform SVN deployment practice
C#简单调用FMU ,进行仿真计算
mysql 最大建议行数2000w,靠谱吗?
数据泄漏、删除事件频发,企业应如何构建安全防线?
Solution and implementation of APP accelerating reading and displaying IPFs pictures
What is the difference between these two sets of code?
【592. 分数加减运算】
OpenShift 4 - 使用 VerticalPodAutoscaler 优化应用资源 Request 和 Limit
2022年安全员-B证考试模拟100题及答案
OpenShift 4 之AMQ Streams(1) - 多个Consumer从Partition接收数据
10. Learn MySQL like clause