查询语句1:select aa,max(bb)from(
select aa,bb from XX
where cc=1 union all select aa,bb from YY
where cc=1)group by aa order max(bb)
查询语句2:select aa,max(bb)from(
select aa,bb,cc from XX
union all select aa,bb,cc from YY)
where cc=1group by aa order max(bb)请问哪一个执行会更快更有效率呢?
select aa,bb from XX
where cc=1 union all select aa,bb from YY
where cc=1)group by aa order max(bb)
查询语句2:select aa,max(bb)from(
select aa,bb,cc from XX
union all select aa,bb,cc from YY)
where cc=1group by aa order max(bb)请问哪一个执行会更快更有效率呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货