Opened 21 months ago

Closed 19 months ago

Last modified 19 months ago

#3289 closed Bug (fixed)

Do not run OPTIMIZE queries on innodb tables

Reported by: matt Owned by: capedfuzz
Priority: normal Milestone: 1.9 -- Piwik 1.9
Component: Core Keywords:
Cc: Sensitive: no

Description

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

Change History (3)

comment:1 Changed 20 months ago by matt (mattab)

  • Owner set to capedfuzz

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

comment:2 Changed 19 months ago by capedfuzz (diosmosis)

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 19 months ago by capedfuzz (diosmosis)

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

Note: See TracTickets for help on using tickets.