0

查询: select field1 as Word,count(*) as Count from TestAdd1214190 group by field1 order by count desc

在 field1 列上创建的 Btree 索引

表中数据 50 lac

引擎:内存

解释类型:简单

使用索引;使用临时;使用文件排序

请建议我如何快速进行此查询

4

1 回答 1

0

正如Count(*)MySql 优化的那样,您使用的列可能存在性能差异。你可以试试我们Count([index field name])

有关此问题的更多信息,请参阅:http ://www.mysqlperformanceblog.com/2007/04/10/count-vs-countcol/。

于 2012-09-20T07:32:11.120 回答