返回数说广场
0
众所周知,GROUP BY会对结果集进行排序。进而消耗较大的资源开销。
在MySQL 5.7版本中,以下哪些写法能避免文件排序?
A
select col1,sum(col2) from table group by col1 desc;
B
select col1,sum(col2) from table group by col1 order by 1=1;
C
select col1,sum(col2) from table group by col1 order by 1;
D
select col1,sum(col2) from table group by col1 asc;
E
select col1,sum(col2) from table group by col1 order by rand();
F
select col1,sum(col2) from table group by col1 order by null;
答案是bf
0
0 166
分享
评论
热门数说


