简体   繁体   中英

\Zend\Db\Metadata\Metadata slow on MySQL

Retrieving metadata from a table ( getConstraints() or getColumns() ) using Zend Framework 2 with MySQL is terribly slow. Is there a solution?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM