Index scan and Index seek

  • Good Morning Experts,

    Execution plan was using index seek till yesterday, but today it is using index scan. I am not understanding what could be the reasons.?Also, how to change from index scan to index seek?

  • Are your statistics up to date? Also I'm assuming that no-one was playing around with the indexes.

    Thanks

  • Depending on the query, your structure, and your data, a scan may be better than a seek. Without seeing your query, structure and execution plan, I can't tell you why things changed. The most likely answer has already been said, statistics. As the stats change, you can, and will, see changes in the execution plan.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • The OP never responded to the first suggestion over a month ago. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply