Bug #74312 | spend too long time to truncate a small table in 5.7.5 | ||
---|---|---|---|
Submitted: | 10 Oct 2014 9:46 | Modified: | 29 Jun 2015 13:45 |
Reporter: | zhai weixiang (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.7.5 | OS: | Any |
Assigned to: | Krunal Bauskar | CPU Architecture: | Any |
Tags: | checkpoint, performance |
[10 Oct 2014 9:46]
zhai weixiang
[10 Oct 2014 9:47]
zhai weixiang
edit synopsis
[10 Oct 2014 13:38]
Mark Callaghan
Is DROP TABLE also a problem?
[10 Oct 2014 13:40]
Peter Laursen
. and "DELETE FROM TABLE"?
[10 Oct 2014 13:49]
zhai weixiang
Only TRUNCATE operation is affected. root@sb1 09:45:05>create table tt (a int); Query OK, 0 rows affected (0.02 sec) root@sb1 09:45:11>drop table tt; Query OK, 0 rows affected (0.20 sec) root@sb1 09:45:14>create table tt (a int); Query OK, 0 rows affected (0.03 sec) root@sb1 09:45:16>truncate table tt; Query OK, 0 rows affected (1 min 56.49 sec) root@sb1 09:48:49> root@sb1 09:48:49>INSERT INTO tt values (1); Query OK, 1 row affected (0.00 sec) root@sb1 09:49:02>DELETE FROM t1; Query OK, 5 rows affected (0.01 sec) root@sb1 09:49:08>DELETE FROM t1; Query OK, 0 rows affected (0.00 sec)
[17 Oct 2014 8:31]
MySQL Verification Team
related: http://bugs.mysql.com/bug.php?id=68184
[22 Oct 2014 7:36]
Sunny Bains
The extra checkpoints are most likely responsible for this. We should quiesce the pages only from the truncated table.
[29 Jun 2015 13:45]
Daniel Price
Posted by developer: Fixed as of the upcoming 5.7.8, 5.8.0 releases, and here's the changelog entry: A TRUNCATE TABLE operation appeared to hang when run in parallel with a read-write workload. Thank you for the bug report.