简体   繁体   English

我可以更改phpMyAdmin的默认查询吗?

[英]Can I change phpMyAdmin's default queries?

I have several large innodb tables (over 500M records). 我有几个大的innodb表(超过500M个记录)。 When I click on one to view it, the system takes forever (a couple minutes) to return the first 30 rows. 当我单击一个查看它时,系统将永远(几分钟)返回前30行。 I went into my shell program and saw that phpMyAdmin was doing a select count(*) from table. 我进入了外壳程序,发现phpMyAdmin正在从表中进行选择计数(*)。 This DIES in innodb. 这个在innodb中死了。 I do have the table indexed by the primary key which is an auto-increment id. 我确实有通过主键索引的表,该主键是一个自动递增的ID。

Is there any way to change this so that phpMyAdmin is actually useful for large innoDB tables? 有什么办法可以改变它,使phpMyAdmin实际上对于大型innoDB表有用吗? It worked fine for myIsam as count(*) performs well there. 它对myIsam来说效果很好,因为count(*)在那里表现良好。 With innodb you need to count an indexed column, such as count(id). 使用innodb,您需要计算一个索引列,例如count(id)。

如果您的phpMyAdmin版本已过时,请升级。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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