>I have an index on all tables with the primary key, which is clustered. That index is the default one and does not have any other field combined nor any included fields.
>
>I just created a new index on the primary key with the inclusion of two fields to satisfy the optimization of one particular SQL select command. To my surprise, the execution plan does not pick it up. The execution plan still takes the main primary key index.
>
>How can I avoid that situation?
Did you try to recompile it? E.g. is it a stored procedure or just a statement? If the latter, try playing with the options OPTION (RECOMPILE) or OPTIMIZE FOR UNKNOWN
If it's not broken, fix it until it is.
My Blog