Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More on performance issue
Message
 
 
To
13/10/2008 13:39:57
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01354488
Message ID:
01354657
Views:
23
>>I've always used SQLParameter as well and it executed sp_executesql behind the scenes anyway.
>>
>>So, what exactly you would try to send to SQL Server?
>
>Yes, SQL Profiler shows it as is. But, when I executed it as is in SSMS, it was a little bit faster than with the DECLARE approach.
>
>Basically, the initial topic was about performance. So, I wanted to verify that the SQLParameter object was not a factor here. It turned out that running those queries with OPTION (RECOMPILE) resolved the issue. I just don't know why SQL Server on specific queries will start crawling but with that option it fixed it.

I believe I read about it recently on the other forum I pointed you to originally. I would not have time to search for this today, I'm afraid, but in few days I may try to find that thread for you there.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform