Primary Exploration of MySQL5.1 Partitioning technology (4)

Source: Internet
Author: User
The 2.5KEY partition is similar to the HASH partition, but its key can be not an integer type, such as a string type field. MySQL Cluster uses the MD5 () function to implement KEY partitioning. For tables using other storage engines, the server uses its own internal hash function, which is based on () the same algorithm. 2.6 different partitions

The 2.5 KEY partition is similar to the HASH partition, but its key can be not an integer type, such as a string type field. MySQL Cluster uses the MD5 () function to implement KEY partitioning. For tables using other storage engines, the server uses its own internal hash function, which is based on () the same algorithm. 2.6 different partitions

2.5 KEY Partition
Similar to HASH partitions, but its key can be a field of the integer type, such as a string. MySQL Cluster uses the MD5 () function to implement KEY partitioning. For tables using other storage engines, the server uses its own internal hash function, which is based on () the same algorithm.
2.6 Comparison of Different partition Technologies
Different partition technologies are listed above, and then compared, as shown in the following table:
Advantages and disadvantages of partition type
Range is applicable to the date type. partitions with limited composite partitions are generally only applicable to a certain column.
List is suitable for columns with fixed values. It supports partition with limited composite partitions. If the values inserted into this column are not included in the List, data loss is generally only applicable to a certain column.
Hash linear Hash makes the data distribution of linear Hash faster by adding, deleting, and merging partitions unevenly. Generally, Hash data distribution is more even only for a certain column.
The efficiency of Key columns can be lower than that of other non-Int types, because the function is a complex function (such as. MD5 or SHA function), generally only for a certain Column
3. Case Analysis
This case is a simulated data of an employee, Department, Department Manager, title, and sales record. The erfigure shows that the data volume is about 4 million. Data download URL: https://launchpad.net/test-db


We can see from the above that the same data is stored separately by partitioning and non-partitioning technologies, so as to facilitate the following query performance analysis and comparison. For a salaries table, it uses RANGE partitions and is defined as follows:

Original article address: MySQL 5.1 partition technology (4), thanks to the original author for sharing.

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.