How can I force a select statement NOT to use a specific index ?

  • Is there a query hint or other syntax or mechanism that will force optimizer not to use a specific index?

     

    Likes to play Chess

  • Well you can force it to use a different index.  You could also disable the index.

  • No hints to say anything but. As ZZMartin noted, you have a couple options.

  • It would be cool if there were a WITHOUT keyword.

    ...

    FROM <table> WITHOUT (INDEX(<index(s) you dont want to use>))
    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

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

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