Why clustered index scan is called everytime instead of Non-clusered index?

  • proactiveamit

    SSC Enthusiast

    Points: 166

    I would like to know why non-clustered index on three or more columns does not work even when the columns are put in the same order in Where clause as in the index and instead of that clustered index scan is called in the Execution plan.

    I found through search that Non clustered index is not called because my where clause was not enough selective but what if I need more data and retrieval should be fast.

    Amit Gupta

    Sr. Software developer

    New Delhi

  • Jack Corbett

    SSC Guru

    Points: 184380

    Well, without more details it's hard to give you an answer. Basically the Query Optimzer has decided that, given the available options, a clustered index scan is the fastest access method. It could be that your non-clustered index does not cover the query (include all the columns returned in the select list). If you post some DDL and a query for an example someone may be able to be more specific.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • Gail Shaw

    SSC Guru

    Points: 1004446

    Please post table definitions, index definitions and execution plan, as per http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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