当前位置:网站首页>MySQL - separate database and table
MySQL - separate database and table
2022-06-10 00:58:00 【Xiao Xian.】
Recommended links :
summary ——》【Java】
summary ——》【Mysql】
summary ——》【Spring】
summary ——》【SpringBoot】
Mysql——》 Sub database and sub table
One 、 The realization of sub database and sub table
Choose the right middleware :mycat、shardingsphere
Horizontal sub database , Horizontal sub table , Vertical sub database , Vertical sub table
1、 Vertical sub database
characteristic : Put a database according to Business Split into different databases
advantage : Reduce concurrent stress 

2、 Horizontal sub table
characteristic : Put a single sheet of data Distribute to multiple databases according to certain rules
advantage : Solve storage bottlenecks 
Two 、 The principle of sub database and sub table
1、 If you can, try not to
2、 If you want to segment, you must choose the appropriate segmentation rules , Plan ahead
3、 Data segmentation tries to reduce cross database by data redundancy or table grouping Join The possibility of
4、 Because of database middleware to data Join It is difficult to grasp the advantages and disadvantages of realization , And it's very difficult to achieve high performance , Use as few tables as possible for business reading Join
3、 ... and 、 summary
| Sub database and sub table | characteristic | advantage |
|---|---|---|
| Vertical sub database | Split a database into different databases according to business | Reduce concurrent stress |
| Horizontal sub table | The data of a single table is distributed to multiple databases according to certain rules | Solve storage bottlenecks |
边栏推荐
- Sword finger offer II 015 All modifiers in the string
- 浅谈Cookie 和 Session——含案例及详细注解
- 1049 robber Ah Fu
- 上位机开发——Modbus到底有多快
- 剑指 Offer II 015. 字符串中的所有变位词
- How WPS merges cells with different sizes
- ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks
- The binary tree is expanded into a linked list [the essence of tree processing -- how to handle each sub tree]
- MySQL - transaction attributes
- Rhcsa day 3
猜你喜欢
Score of sub series of previous test questions and [11th] [provincial competition] [group B]

Rhcsa premier jour

Mysql——》分库分表

Rhcsa day 2

消防应急照明和疏散指示系统在某洁净医药的设计与应用
Weights of complete binary tree of past real questions [10th] [provincial competition] [group B]

线性规划和对偶规划学习总结

How to optimize slow queries? (actual combat slow query)

Chapter 6 domain controller security

Benders decompositon学习笔记记录
随机推荐
1049大盗阿福
总结——》【JVM】
WPS how to adjust the position of text after merging cells
run npm fund for details
The state of gurobi solution and its attribute acquisition
Sword finger offer II 021 Delete the penultimate node of the linked list
Internal network infiltration tunnel
Typera basic use and change the theme style of typera
Facial Emotion Recognition: State of the Art Performance on FER2013
线性规划和对偶规划学习总结
LEAK: ByteBuf. release() was not called before it‘s garbage-collected
CSV files of fer2013 are converted to Imagenet format (saved in folders of their respective categories in image format)
消防应急疏散指示系统在某生物制药工厂项目的应用
Sword finger offer II 012 The sum of left and right subarrays is equal
OSPF first experiment
OSPF第一次实验
Disorder of flinksql
Apply the latest ad and Txk patches
Mysql——》varchar
How to keep the contents of WPS merged cells in one cell