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