>Have you tried something like
>
>
UPDATE SET Fields = ?mValue WHERE Field2 = ?SomeLowSelectiveValue AND Field3 = ?SomeHighSelectiveValue
>
>And then sometime after it
>
>
UPDATE SET Fields = ?mValue WHERE Field2 = ?SomeHighSelectiveValue AND Field3 = ?SomeLowSelectiveValue
>
>You migh get a nasty surprise by the second statement to seem hanging. If we only could give a hint that the second needs to recompile its execution plan, I would always use parameters, but unfortunately, sometimes hardcoding makes some sense.
>
Hi Walter,
SQL 2005 and later has RECOMPILE query hint similar to stored procedures WITH RECOMPILE option..
--sb--