Bug #103054 | DISCARD TABLESPACE of an empty table takes a long time with a large buffer pool | ||
---|---|---|---|
Submitted: | 22 Mar 2021 6:01 | Modified: | 5 Apr 2021 6:52 |
Reporter: | Hao He | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S5 (Performance) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[22 Mar 2021 6:01]
Hao He
[23 Mar 2021 13:14]
MySQL Verification Team
Hi Mr. He, Thank you for your bug report. We have tested your report and this operation is much faster on 8.0 than on 5.7. If that is the same situation in your case, then let us inform you that performance will not be improved in 5.7. Hence, let us know your experience with 8.0.
[25 Mar 2021 5:32]
Hao He
Thanks for your timely reply! I'll run my test against mysql 8.0 and reply back with the result.
[26 Mar 2021 13:38]
MySQL Verification Team
We are waiting on your feedback.
[29 Mar 2021 4:26]
Hao He
I have repeated my tests on the latest mysql 8.0. Indeed, the Discard Tablespace time remains small when the data size in the buffer pool grows. bufferPoolPages DISCARD TABLESPACE time 2.7 GB 0.01 sec 5 GB 0.01 sec 20 GB 0.01 sec It's great that this performance issue is resolved in mysql 8.0. Could you point me to the relevant change in mysql 8.0 that contributed to this improvement? I am asking this because it might be easier for us to backport/implement a fix to the old mysql version we are using, rather than upgrade our production server to 8.0 as a whole.
[29 Mar 2021 12:42]
MySQL Verification Team
Hi Mr. He, Thanks for your feedback. A feature in 8.0 that enables fast discarding of the tablespace is the introduction of the data dictionary and due to the grouping of all system data into a single system tablespace. No other version, except for 8.0, has these feature. This is all described in our 8.0 Reference Manual. Not a bug.
[5 Apr 2021 6:52]
Hao He
Thanks for explaining why Discard Tablespace is faster in mysql 8.0. I have no more questions. Feel free to resolve this issue as mysql performs as expected.
[5 Apr 2021 13:06]
MySQL Verification Team
Thank you, Mr. He.