Posted on 2011-05-12
Last Modified: 2012-05-11
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?
Question by:Mr_Shaw
    LVL 9

    Accepted Solution

    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.

    Author Comment

    I do not have any Index scans does that mean I don't have a SARG problem?
    LVL 9

    Assisted Solution

    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

    Author Closing Comment


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example, show how to shrink a transaction log file down to a reasonable size.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now