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

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

水平分表

分库分表应用和问题
应用
- 在数据库设计的时候考虑垂直分库和垂直分表。
- 随着数据库数据量增加,不要马上考虑水平切分,首先考虑缓存处理,读写分离,使用索引等方式,如果这些方式不能根本解决问题了,再考虑做水平分库和水平分表。
分库分表问题
- 跨节点连接查询问题(分页、排序等)。
- 多数据源管理问题。
总结
垂直拆分,拆分出来的数据结构是不同的。
水平拆分,拆分出来的数据结构相同。
边栏推荐
- c# 有符号和无符号字节变量
- IT行业数据与应用关系的变迁
- 阿里云服务器搭建和宝塔面板连接
- Openshift 4 - use verticalpodautoscaler to optimize application resource request and limit
- 2022 safety officer-b certificate examination simulated 100 questions and answers
- 什么是跨域?如何解决请跨域问题?
- 7 C控制语句:分支和跳转
- IP protocol of network layer
- Map of China province > City > level > District > Town > village 5-level linkage download [2019 and 2021]
- 【C语言】详解顺序表(SeqList)
猜你喜欢

Machine learning (11) -- time series analysis
![[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

5 operators, expressions, and statements

Promise实例如何解决地狱回调

QT基础练手小程序-简单计算器设计(附带源码,解析)

Detailed introduction of v-bind instruction

final关键字和枚举类型

Promise学习笔记

QT basic hand training applet - simple calculator design (with source code, analysis)
![[附下载]推荐几款暴力破解和字典生成的工具](/img/c6/f4a9c566ff21a8e133a8a991108201.png)
[附下载]推荐几款暴力破解和字典生成的工具
随机推荐
DN-DETR 论文精度,并解析其模型结构 & 2022年CVPR论文
[one flower, one world - Professor Zheng Yi - the way of simplicity] interpretable neural network
【高数】高数平面立体几何
Get started quickly with flask (I) understand the framework flask, project structure and development environment
Recommend an artifact to get rid of the entanglement of variable names and a method to modify file names in batches
从开发转测试:我从零开始,一干就是6年的自动化测试历程
2022 safety officer-c certificate special operation certificate examination question bank and answers
力扣题(1)—— 两数之和
oracle 创建用户且只有查询权限
VR全景拍摄,助力民宿多元化宣传
2022 safety officer-b certificate examination simulated 100 questions and answers
01-TensorFlow计算模型(一)——计算图
2022安全员-C证特种作业证考试题库及答案
Send a message to the background when closing the page
DAPP safety summary and typical safety incident analysis
负数的十六进制表示
Face warp - hand tear code
12 common design ideas of design for failure
final关键字和枚举类型
【多线程】println方法底层原理