例如我查询我的用户总的人数,男用户人数,女用户人数select count(userid) from userinfo
union all
select count(userid) from userinfo where sex = '男'
union all
select count(userid) from userinfo where sex = '女'上面的SQL 在查询10万条数据以内的话
一定比
我同时查询3次
select count(userid) from userinfo
select count(userid) from userinfo where sex = '男'
select count(userid) from userinfo where sex = '女'的性能要好吗?