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.