Different forms of data segmentation in Mysql

Source: Internet
Author: User

Sharding of different data forms in Mysql can be divided into two Sharding modes based on the Sharding rule type. One is to split the data to different databases (hosts) based on different tables (or Schemas). Such splitting can be called vertical data splitting; the other is to split the data in the same table into multiple databases (hosts) based on the Logical Relationship of the data in the table. This split is called the data level (horizontal) splitting; advantages of vertical splitting 1. database splitting is simple and clear, and sharding rules are clear; 2. the application module is clear and clear, and integration is easy; 3. data maintenance is convenient and easy to locate; disadvantages of vertical segmentation 1. some table associations cannot be completed at the database level and must be completed in the program; 2. tables with extremely frequent access and massive data volumes still have stable performance and may not meet requirements. 3. transaction processing is relatively more complex; 4. when the splitting reaches a certain degree, the scalability will be limited; 5. read splitting may cause complicated system transition and difficult to maintain; A simple horizontal split mainly refers to distributing a table that accesses an extremely ordinary table to multiple tables according to certain rules of a field. Each table contains part of the data. Advantages of horizontal splitting 1. table association can be completed at the database end. 2. there will be no bottlenecks in tables with large data volumes and high loads; 3. the overall architecture of the application is relatively small; 4. transaction processing is relatively simple; 5. as long as the splitting rules can be defined, it is basically difficult to meet scalability restrictions. disadvantages of horizontal splitting 1. splitting rules are more complex and it is difficult to abstract a segmentation rule that can satisfy the entire database; 2. data maintenance becomes more difficult in the future, making it more difficult to manually locate data. 3. the coupling of each module in the application system is high, which may cause some difficulties for subsequent data migration and splitting.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.