我有几个union all的查询,因为现在数据有限,不知道哪一种速度更快:第一种:
select 需要的字段列 from t1 where 条件
union all
select 需要的字段列 from t1 where 条件
union all
select 需要的字段列 from t1 where 条件
union all
select 需要的字段列 from t1 where 条件第二种:select * from(
select 需要的字段列 from t1
union all
select 需要的字段列 from t1
union all
select 需要的字段列 from t1
union all
select 需要的字段列 from t1)
as a where  条件条件都是一样的,不知道在理论上第一种和第二种哪一种更快?
谢谢!