MySQL Horizontal split case

Source: Internet
Author: User

Horizontal split: By placing data rows in separate tables based on the values of one or more columns, the horizontal table can be combined with multiple low-profile hosts to achieve high performance.

according to the company's business, two sets of duplicate architectures are deployed in different IDC , the data needs to be merged, and the database is implemented horizontally to store the business data, such as the architecture diagram:

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8D/5C/wKiom1iZY-XjXvR3AAA2K5Zh_b8150.png-wh_500x0-wm_3 -wmp_4-s_1266656328.png "title=" Abcd.png "alt=" Wkiom1izy-xjxvr3aaa2k5zh_b8150.png-wh_50 "/>

Description: routing Table A role:Md5key As the basis of the sub-table strategy, the md5key value of the modulo operation, the data needs to be written to the specific table location.

Generally for business needs, this field can be processed accordingly, the protection of data, such as the statement:

SELECT Id,mod (CRC32 (KEYMD5), +) from User_index Implementation of the User_* sub-table implementation, in the routing table and the table is associated with the ID field, the ID and the UID corresponding, the relationship between the AC table and the routing table is also the ID and UID corresponding, that is, the routing table adds a row of records, for the other tables unique UID value, to achieve horizontal expansion of data.


This article is from the "DBSpace" blog, so be sure to keep this source http://dbspace.blog.51cto.com/6873717/1895617

MySQL Horizontal split case

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.