• ananda.murugesan (7/15/2013)


    I modified Query as per your suggestion and fetching result 00 seconds..But NC clustred index seek 50% and .. what could be issues?, Need to change index column? and all Inner Join seeks 0%

    attched here actual plan

    As Gail says, why should that be a problem? The costs are relative - you won't get them all down to 0%!!

    The route taken by the optimiser to fetch rows from the RESULT table could be improved by using a covering index and by including a couple more keys. Try this:

    create a new index on the RESULT table with keys SAMPLE_NUMBER, STATUS and ANALYSIS,

    and included columns UNITS, NAME, NUMERIC_ENTRY. Then check the plan - the order of the keys is significant and is tricky to get right on the first attempt.

    Edit - removed RESULTNUMBER, it's the cluster key.

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden