optimize big sql query
All time we use lot of SQL queries. But we don’t consider about its performance. If we follow some tips then our query will be more efficient. Some of them are.


Use views and stored procedures instead of heavy-duty queries.
Try to use constraints instead of triggers, whenever possible.
Use table variables instead of temporary tables.
Try to use UNION ALL statement instead of UNION


For more http://cybarlab.blogspot.com/2013/02/sql-queries-optimization-tips.html

Thanks n regard