Jasinski Technical Wiki


Home Page
All Pages

Quick Search
Advanced Search »

Contributor Links

Create a new Page
File Management
Your Profile

Other Wiki Sections



Page History: Database Command Timeouts: Performance Differences between .NET and Management Studio

Compare Page Revisions

« Older Revision - Back to Page History - Newer Revision »

Page Revision: Wed, Jan 04, 2012, 3:15 PM


Why are there performance differences when a SQL statement is called from .NET app vs when the same call is made in Management Studio?

This is usually because you are getting a different execution plan in your SSMS connection. Often related to parameter sniffing issues where when the plan gets generated with a specific value that is sub optimal for other values of the parameters. This also explains why recompiling would resolve the issue.


  • Google "parameter sniffing SQL Server"
  • If it's just one stored procedure, recompile it, then immediately run it in Management Studio with the parameters of interest.

ScrewTurn Wiki version Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2020, Patrick Jasinski.