Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not run OPTIMIZE queries on innodb tables #3289

Closed
mattab opened this issue Jul 31, 2012 · 3 comments
Closed

Do not run OPTIMIZE queries on innodb tables #3289

mattab opened this issue Jul 31, 2012 · 3 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jul 31, 2012

Reported in forums

Innodb does not work well with OPTIMIZE statements, esp. on large tables. I suggest we do not run the OPTIMIZE statement when the table is Innodb.

Could we detect that the table is using Innodb?

The code is in optimizeTables() in /trunk/core/PluginsFunctions/Sql.php

@mattab
Copy link
Member Author

mattab commented Sep 5, 2012

let's add a new config option

[General]
; set to 0 when using Innodb tables in your database, because OPTIMIZE queries can take hours to run on very large Innodb tables
mysql_enable_optimize_tables = 1

@diosmosis
Copy link
Member

(In [7096]) Fixes #3289, don't optimize InnoDB tables.

@diosmosis
Copy link
Member

(In [7098]) Refs #3289, change test name + filename.

@mattab mattab added this to the 1.9 -- Piwik 1.9 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants