No index hint

  • Hi,

    Is there a hint not to use any indexes ? If yes, can you put a sample script ? I just want to compare diffrent indexing as well as to force query not to use any.

    Thanks

     

  • Why would you want a hint to force a query not to use indexes ?  SQL Server will typically make the right judgement call if the query is optimal and if the stats are properly collected (of course there are other factors as well like hardware,memory etc.).

    If you want to compare different indexing schemes, you can play with indexes or try out different index hints in the SQL statement itself.

  • The reason why I want this hint is I suspect that we don't really need any indexes on this particular table (or maybe we don't need them for certain values in Where clause), but I can't play with indexes because this is production database.

  • indexes are used by the server to find data faster.

    I doubt you might want the server to get the data slower or less efficiently.

    in a complex query, you might add a hint to use a certain index because using a index determined by a query plan might be slower than a tuned query.

    I think you might be confusing indexes with something else; could you explain further?

     

     

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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