Bug #61401 | UPDATE performance degrades gradually if a trigger exists | ||
---|---|---|---|
Submitted: | 3 Jun 2011 17:47 | Modified: | 16 Jun 2011 19:49 |
Reporter: | Aurimas Mikalauskas | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S5 (Performance) |
Version: | MySQL 5.5.3+ | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | innodb, mdl, metadata locks, performance, regression, trigger, UPDATE |
[3 Jun 2011 17:47]
Aurimas Mikalauskas
[3 Jun 2011 18:36]
Aurimas Mikalauskas
For the record, just checked it with MySQL 5.5.13 on Mac OS X 10.6, the problem is still there: $ mysqladmin -ri1 ext | grep Innodb_rows_updated | Innodb_rows_updated | 0 | | Innodb_rows_updated | 0 | | Innodb_rows_updated | 9142 | | Innodb_rows_updated | 6715 | | Innodb_rows_updated | 5634 | | Innodb_rows_updated | 4875 | | Innodb_rows_updated | 4315 | | Innodb_rows_updated | 3913 | ... | Innodb_rows_updated | 546 | | Innodb_rows_updated | 546 | | Innodb_rows_updated | 519 | | Innodb_rows_updated | 539 | | Innodb_rows_updated | 538 | | Innodb_rows_updated | 534 | | Innodb_rows_updated | 55 | | Innodb_rows_updated | 0 | | Innodb_rows_updated | 0 | | Innodb_rows_updated | 0 |
[9 Jun 2011 12:26]
Sveta Smirnova
Thank you for the report. Verified as described. Problem is not repeatable with version 5.1
[16 Jun 2011 19:49]
Paul DuBois
Noted in 5.5.15, 5.6.3 changelogs. Incorrect handling of metadata locking for FLUSH TABLES WITH READ LOCK for statements requiring prelocking caused two problems: 1) Execution of any data-changing statement that required prelocking (that is, involved a stored function or trigger) as part of transaction slowed down somewhat all subsequent statements in the transaction. Performance in a transaction that periodically involved such statements gradually degraded over time. 2) Execution of any data-changing statement that required prelocking as part of transaction prevented a concurrent FLUSH TABLES WITH READ LOCK from proceeding until the end of transaction rather than at the end of the particular statement. CHANGESET - http://lists.mysql.com/commits/139357