I've got this 780line query that i'm porting from oracle to sqlserver. I've already changed what i needed, and am running the query.
I would also like to optimize the query in order to run it more efficiently.
there are three subselects and a total of 16 unions and one left outer join.
what can i do in order to optimize? views wouldn't help, right?
it will be stored as a stored procedure so that will help some, but i want to optimize the query itself.