求助 sql 的效率??
SELECT COUNT(DISTINCT `ems`) FROM `llc_emsarchive` WHERE SUBSTRING(FROM_UNIXTIME(`uptime`), 1, 7)='2014-08'SELECT COUNT(*) FROM (SELECT distinct `ems` FROM `llc_emsarchive` WHERE SUBSTRING(FROM_UNIXTIME(`uptime`),1,7)='2014-08') T
SELECT COUNT(*) FROM (SELECT `ems` FROM `llc_emsarchive` WHERE SUBSTRING(FROM_UNIXTIME(`uptime`),1,7)='2014-08' GROUP BY `ems`) T
那种sql的效率高?为什么?