C# – analyze SQL Server performance issue

asp.netcnetsql-server-2008visual-studio-2008

I am developing using VSTS 2008 + C# + .Net 3.5 + ASP.Net + SQL Server 2008 Express. I am working on 32-bit platform with Windows Server 2003. The issue I find is simple SQL statement like select/create a simple table is very small from SQL Server Management Studio.

BTW: I think it should be machine specific issue since the same code runs correctly on another machine. But I am not 100% sure. May be this machine triggers some bug in my code?

Any ideas how to analyze to find the low performance bottleneck?

Best Answer

A good start is to use SQL Server Profiler to identify the long-running queries.

Once you have an idea about which ones are problematic, you can use SQL Server Management Studio to examine their query plans to see if you should add any indexes, etc.