Let's say we have a query that is essentially using a union to combine 2 recordsets into 1. Now, I need to duplicate the records by way of typically using a join. I feel option 1 is in my opinion the best bet for performance reasons but was wondering what the SQL Query experts thought.
Basically, I "know" the answer is "1". But, I am also wondering, could I be wrong - is there a side of this I might be missing?
(SQL Server) Here are my options.
pseudo-code
Original Query:
Select Name, Category from t1
Union
Select Name, Category from t2
Option 1)
Select Name, Category from t1
Inner Join (here)
Union
Select Name, Category from t2
Same inner Join (here)
Option 2)
Select * from (
Select Name, Category from t1
Union
Select Name, Category from t2
) t
(Inner Join Here)