• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 830
  • Last Modified:

SQL SARG

Does do you only have to concerned the SARG in the WHERE clause.

Do you also have to be concerned with SARG with in the SELECT statements?

For example using CASE or COALESCE in the SELECT statement?
0
Mr_Shaw
Asked:
Mr_Shaw
  • 2
  • 2
2 Solutions
 
anillucky31Commented:
Yes you need to careful with SARG in comparison no matter whether it is in where condition or in case condition. It will hit performance.

See this article it has explained everything about SARG.

http://www.sqlservercentral.com/articles/Performance+Tuning/bewareofsearchargumentsargdatatypes/2485/ 
0
 
Mr_ShawAuthor Commented:
I do not have any Index scans does that mean I don't have a SARG problem?
0
 
anillucky31Commented:
if in your query execution plan  you see CONVERT_IMPLICIT it mean you are using SARG and it wont utilize you index on that column and it will do full table scan due to that your query will become slow
0
 
Mr_ShawAuthor Commented:
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now