Bug #65286 | Avoid copying on REORGANIZE PARTITION where possible | ||
---|---|---|---|
Submitted: | 11 May 2012 16:28 | Modified: | 12 May 2012 10:34 |
Reporter: | Hartmut Holzgraefe | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S5 (Performance) |
Version: | mysql 5.1, 5.5 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[11 May 2012 16:28]
Hartmut Holzgraefe
[12 May 2012 10:34]
Valeriy Kravchuk
Thank you for the problem report. Verified with 5.5.x on Mac OS X.
[22 Oct 2012 9:52]
Clive Cox
Any update on this. For using partitioning on a live system to provide a rolling table of partitions, add new to front drop old off back, this is really needed to reduce downtime. Especially for large tables used within a replication scenario.
[10 Apr 2013 19:49]
Mattias Jonsson
The assumption 'if all rows from the original partition will end up in the same new partition anyway' needs to scan all rows in the partition in the general case, so it will not be an instant operation. Only if there is an usable index, one could do this in a fast way. In this case I suggest to REORGANIZE the last partition before any rows is inserted into it. Or not using a MAXVALUE partition and instead ADD new partitions to increase the end range.
[8 May 2013 3:25]
Mclyn Dmcx
ALTER TABLE table_name REORGANIZE PARTITION current_partition INTO PARTITION current_partition VALUES LESS THAN (18000000), PARTITION new_partition VALUES LESS THAN MAXVALUE); Executing this query took us 2-3 minutes and INSERT or UPDATE on the table cannot be performed during the partitioning operation. Fixing this bug as soon as possible would help us decrease our application's downtime. Thanks!
[15 Jan 2015 14:43]
Tim Smith
The same problem also occurs on 5.6.20.