Re: strong performance problem with a parameterized query.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Silvere wrote:
We have a strong performance problem with a quite complex query.
The query executes in approximately 7 seconds in Query Analyser
(which is okay for us), but

This is usually caused by a SQL Server optimization behavior called
"parameter sniffing". This explains it better than I can:

http://tinyurl.com/f9r2


And, as Stephen says, a better group for this question would have been
the adonet group, or even the .sqlserver.programming group.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.