>On one particular situation, I have a parameterized index which has an effect on the execution plan. If I have the @Field syntax in the where clause, to have it parameterized, the execution plan cannot benefit from the index we have created and goes in lookup mode. If we remove the @Field and replace that with 1, as a numeric value, as this is a boolean field, the execution plan will adjust accordingly and use the proper index.
>
>As we need to be parameterized all the way, I need to find what could be a factor in here.
You may want to start reading from this article
Parameter Sniffingand then proceed with this article
http://www.sommarskog.se/query-plan-mysteries.html
If it's not broken, fix it until it is.
My Blog