Bug #91190 | DROP PARTITION and REORGANIZE PARTITION are slow | ||
---|---|---|---|
Submitted: | 8 Jun 2018 16:51 | Modified: | 20 Jul 2018 14:28 |
Reporter: | Carl Letourneau | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S3 (Non-critical) |
Version: | 8.0.11 | OS: | CentOS |
Assigned to: | CPU Architecture: | Any |
[8 Jun 2018 16:51]
Carl Letourneau
[20 Jun 2018 12:54]
MySQL Verification Team
Hi, First of all, with 100 Gb of data, you are expected to wait for the long time to re-organise the partitions. 100 Gb should be respected. Second, what is exactly long time ?? Third of all, for such high amount of data you are expected to have entire server perfectly tuned and that your hardware is very fast, including using SSD for your most used data. Fourth, have you experienced any slowdown between 8.0.11 and previous versions ??? Fifth, have you considered adding an index on that timestamp ????
[20 Jun 2018 14:16]
Carl Letourneau
DROP partition should be in the same ballpark as deleting a file. On my server, this is instantaneous for a 10G file. I realize that MySQL would have some minor overhead. REORGANIZE PARTITION on an EMPTY partition (as mentioned in my submission) should, likewise, be in the same ballpark as creating an empty table. Zero rows are read/inserted during the operation. I've seen these operations take a few minutes. The table is unavailable for writes during this time. Indexing the Timestamp as you suggest would be somewhat useful to perform DELETEs instead of DROP PARTITIONs. Since we're talking about the deletion of billions of rows per day, even with an index, this would result in significant I/O. I'm using partitions specifically to avoid this scenario. Finally, yes, I'm using PARTITIONs on a 5.7 server with expected performance.
[20 Jun 2018 14:28]
MySQL Verification Team
Hi, Few questions only ... How much time does it take to perform any of the DDL statements that you mentioned ??? How many rows are reorganised in the partition and how much time does it take on 5.7 and 8.0 ???
[21 Jul 2018 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[28 Mar 2023 4:52]
Amit Zor
We have managed to resolve this by setting the parameter innodb_adaptive_hash_index = 0 see more info in https://bugs.mysql.com/bug.php?id=101900
[28 Mar 2023 12:24]
MySQL Verification Team
We are happy to hear about it .