If there are multiple connections concurrently executing a query with different parameters in a filter condition and the WITH RECOMPILE option is used, is there any chance that the query may produce incorrect results?


This ought not happen, but there have been several bugs that mean it might, depending on your version of SQL Server, and which patches you have applied.

The relevant Microsoft KB articles are listed below:

FIX: Incorrect result when you execute a query that uses WITH RECOMPILE option in SQL Server 2012 or SQL Server 2014

FIX: A query that uses parameters and the RECOMPILE option returns incorrect results when you run the query in multiple connections concurrently in SQL Server 2008

FIX: Different results may be returned when you concurrently run the same query with the RECOMPILE option in SQL Server 2008

Not the answer you're looking for? Browse other questions tagged or ask your own question.