Friday, July 10, 2015

SQL Query optimization techniques

Queries optimization in SQL SERVER


Use between clause in place of  Comparisons like <= and >=


When comparing dates like <='2001-02-02' and >='2014-01-03' we can simply use filter like date between '2001-02-02'  and '2014-01-03'.

Don't club sub queries when using union operation directly.


Store the results of each sub query in a separate table then apply union operations on that.


Try to reduce functions in Queries.


 


 

No comments:

Post a Comment