MySQL WHERE substring_index count(*) 效率问题
黄舟
黄舟 2017-04-17 13:27:26
0
2
510
SELECT SUBSTRING_INDEX(domain,".",-1) as tld, count(*) AS count \
               FROM domain_whois WHERE flag <> -6 GROUP BY tld

domain_whois表中有两个字段,domain 与 flag。domain例:baidu.com, flag例:-6
大约七百万数据,运行上面的数据需要30+s时间,请问有什么技巧可以提高效率?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!