在千万条数据的数据表中, 使用select count(distinct col_name,...) from table;使用的查询时间太大 应该使用 select count(*) from (select distinct col_name,... from table) as temp; 这样的查询时间将大大的缩短。 详细分析 讨论分析