当前位置:网站首页>Shardingsphere sub database and table scheme
Shardingsphere sub database and table scheme
2022-07-23 11:06:00 【Road of Kings 001】
lately , When the research background database is too large , Related sub database and table solutions .
1. Sub database and sub table
When the database and data table in a database are large enough , There are many problems . Because most databases use B The tree is stored , When the amount of data is too large , Excessive resource access will occur , Data lag . In the face of such problems , A better solution is to divide the database into tables .
There are two schemes for dividing databases and tables : Vertical segmentation and horizontal segmentation .
Vertical segmentation is generally divided into different parts for different businesses and different fields , Horizontal segmentation generally means that the same database or data table is divided into different databases and tables according to certain rules .
Generally speaking , The library generally adopts vertical segmentation , The advantage is that the library is dedicated ; The table adopts horizontal segmentation , Avoid excessive quantity .
2. The result of amalgamation
After database and table segmentation , The data will actually be segmented into different databases . Of course , Logically , The data in different databases are still in a set . therefore , The process of operating a database must be :
1) When entering data , Data is divided into different entity databases or data tables according to certain rules ;
2) During the query , Query in different physical entities by table ; Wait until the data is queried , Will merge data .
therefore , After querying the data , Will merge data .
3.ShardingSphere Technical solution
according to Apache Its official website says ,“ShardingSphere Is a set of open source distributed database middleware solutions composed of the ecosystem , It consists of Sharding-JDBC、Sharding-Proxy and Sharding-Sidecar( Planned ) this 3 The products are independent of each other . They all provide standardized Data fragmentation 、 Distributed transactions and database governance function , It can be applied to such as Java isomorphism 、 Heterogeneous languages 、 Various application scenarios such as cloud native .”
ShardingSphere It is a better technical scheme at present , After using the configuration, you can complete the relevant scheme of dividing databases and tables .
4. Read / write separation
Read / write separation , yes ShardingSphere Another option for . The basic idea is : Write with the main table , Read with auxiliary table . This makes reading faster , Make writing less intrusive . The only problem is : This may cause data inconsistency between the primary table and the secondary table .
5. Distributed transactions
Distributed transactions , yes ShardingSphere Important functions of . There are several mechanisms for distributed transactions :
1) Two stage method : Submission respectively , Make the transaction finally consistent ;
2) Flexible business : Maintain the final consistency of transactions .
6. reference
边栏推荐
- Pyqt5 use qpainter to draw the coordinate axis and display the scatter diagram
- mysql语法(纯语法)
- 【信息系统项目管理师】第六章 复盘进度管理知识架构
- 对比redis的RDB、AOF模式的优缺点
- Deploy storageclass trample record
- 大规模后台导出Excel无法并发
- SPR:SUPERVISED PERSONALIZED RANKING BASED ON PRIOR KNOWLEDGE FOR RECOMMENDATION
- Matlab中的滤波器
- pycharm占用c盘
- 比特,比特,字節,字的概念與區別
猜你喜欢

Activiti工作流使用之流程结构介绍

对比redis的RDB、AOF模式的优缺点

Redis source code and design analysis -- 7. Quick list

C1 -- vivado configuration vs code text editor environment 2022-07-21

PMP practice once a day | don't get lost in the exam -7.22

一次 MySQL 误操作导致的事故,「高可用」都不好使了

Murata power maintenance switch server power maintenance and main functional features

SPR:SUPERVISED PERSONALIZED RANKING BASED ON PRIOR KNOWLEDGE FOR RECOMMENDATION

Déploiement du projet (version abrégée)

Detailed explanation of structure
随机推荐
img标签设置height和width无效
村田muRata电源维修交换机服务器电源维修及主要功能特点
EntityManagerFactory和EntityManager的一个用法探究
MySQL-8.0.28 用户操作 or 用户权限操作
Redis source code and design analysis -- 11. Hash object
Mysql事务回滚机制与原理
人脸识别神经网络实现
超级简单的人脸识别api 只需几行代码就可以实现人脸识别
好玩的代码雨,在线分享给大家~-
比特,比特,字節,字的概念與區別
Deploy metersphere
Analyse du code source et de la conception de redis - - 7. Liste rapide
C ivalueconverter interface usage example
web调用接口上传图片到七牛云
图片模糊处理批量生产模糊数据集
Error in na.fail. default(list(Purchase = c(“CH“, “CH“, “CH“, “MM“, “CH“, : missing values in obj
MySQL syntax (pure syntax)
wps中的word中公式复制完后是图片
C#的partial用法
Mysql的索引为什么用的是B+树?