distinct和group by的效率

来源:互联网 发布:足球关注分析软件 编辑:程序博客网 时间:2024/05/01 08:38
加了索引之后 distinct 比没加索引的 distinct 快。
加了索引之后 group by 比没加索引的 group by 快。
再来对比 :distinct  和 group by
不管是加不加索引 group by 都比 distinct 快。因此使用的时候建议选 group by
0 0