SQL Server2012 : the query with unill all can never return the whole result
Hey there,
I have a query like:
Select col1 , col2 from Table1 --return around 800K rows
union all
select col1 , col2 from Table2 -- return around 800k rows
when I split the query to run the two sub-query, they can finish and return the whole result soon. But when I tried to run the query with the UNION ALL, it returns around 800K rows and the get stucked and can NEVER finish.
I would really appreciate if someone could give me a little help.
Best wishes!!