In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "what is the meaning of range partition in mysql", the content is simple and clear, hoping to help you solve your doubts, let the editor lead you to study and learn "what is the meaning of range partition in mysql" this article.
The main contents are as follows: 1. Based on the given interval boundary, several continuous interval ranges are obtained, and the data is allocated to different partitions according to the landing point of the partition key.
Range partitions are mainly used for partitions of date columns.
2. Range partitioning is realized by using PARTITION BY RANGE (expr).
Where expr can be a column value, or an expression based on a column value and returning an integer value, such as YEAR (date).
Example
CREATE TABLE `Order` (`id` INT NOT NULL AUTO_INCREMENT, `partition_ Key` INT NOT NULL, `amt` DECIMAL (5) NULL) PARTITION BY RANGE (partition_key) PARTITIONS 5 (PARTITION part0 VALUES LESS THAN (201901), PARTITION part1 VALUES LESS THAN (201902), PARTITION part2 VALUES LESS THAN (201903), PARTITION part3 VALUES LESS THAN (201904), PARTITION part4 VALUES LESS THAN (201905), PARTITION part4 VALUES LESS THAN MAXVALUE INSERT INTO `Order` (`id`, `partition_ key`, `amt`) VALUES ('1partition_,' 201901partition, '1000'); INSERT INTO `Order` (`id`, `Order`, `amt`) VALUES (' 2Order`, '201902regions,' 800'); INSERT INTO `Order` (`id`, `Order`, `amt`) VALUES ('3neighbors,' 201903zones, '1200'); above is all the content of this article entitled "what is the meaning of range partition in mysql"? thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.