Reputation: 429
Retrieving metadata from a table (getConstraints()
or getColumns()
) using Zend Framework 2 with MySQL is terribly slow. Is there a solution?
Upvotes: 0
Views: 247
Reputation: 429
Mysql is terribly slow retrieving data from information schema. One solution is disabling stats on metadata by modifyng 'my.cfn'
innodb_stats_on_metadata=0
You can do this in the config file or dynamically:
mysql> set global innodb_stats_on_metadata=0;
Slow query on information_schema.tables
Upvotes: 2