Great article on stored proc performance in app vs SSMS

I’ve have occasional issues with some reports where the report will timeout running in the app, but the report stored proc returns in less than a second when I run it in SSMS with the same parameters. I realized a while ago that recompiling the stored proc will fix the issue, but today I found an article that explains why this happens (spoiler: it’s because of cached execution plans & parameter sniffing). So here’s the article – it’s a long read, but it might come in handy for you:

http://www.sommarskog.se/query-plan-mysteries.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s