In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to add and delete instances in MySQL 5.5 range partition. I hope you will gain a lot after reading this article. Let's discuss it together.
Introduction
RANGE partitions are based on a given contiguous range, while previous versions of RANGE were mainly integer-based partitions. RANGE partitions can also be used for DATE and DATETIME columns in version 5.7, while non-shaping-based RANGE COLUMN partitions are provided in versions above 5.5. RANGE partitions must be contiguous and cannot overlap. Use
"VALUES LESS THAN ()" to define the partition interval, non-shaping range values need to use single quotation marks, and you can use MAXVALUE as the highest value of the partition.
This article will introduce you to MySQL 5.5 range partition add and delete processing, and share it with you for your reference. Let's take a look at the detailed introduction:
1. Delete partition
# # View the amount of data of the partition to be processed And export as backup mysql > select count (*) from baby_account_change_log where updated_time > '2016-12-01 00 and updated_time select 00and updated_time select * into outfile' / tmp/baby_account_change_log_p1.sql' from baby_account_change_log where updated_time > '2016-12-01 00 mysql (*) from baby_account_change_log where updated_time >' 2016-12-01 00:00 00' and updated_time alter table baby_account_change_log drop partition p0 Query OK, 0 rows affected (0.01 sec)
Second, increase the number of zones
# error prompts to delete the storage maximum partition mysql > alter table baby_account_change_log add partition (PARTITION p13 VALUES LESS THAN (unix_timestamp ('2017-12-31 2323 PARTITION 59 VALUES LESS THAN)); ERROR 1481 (HY000): MAXVALUE can only be used in last partition definition# deletes the storage maximum partition mysql > alter table baby_account_change_log drop partition p12 # # add a new partition mysql > alter table baby_account_change_log add partition (PARTITION p12 VALUES LESS THAN (unix_timestamp ('2017-12-31 23 unix_timestamp 59 VALUES LESS THAN 59). After reading this article, I believe you have some understanding of how to add and delete processing instances in MySQL 5.5 range partition. If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.