A checklist for improving execution time between .NET code and SQL Server. Anything from the basic to weird solutions is appreciated.
Code:
Chan
Are you using stored procedures? If so you should watch out for parameter sniffing. In certain situations this can make for some very long running queries. Some reading:
http://blogs.msdn.com/queryoptteam/archive/2006/03/31/565991.aspx
http://blogs.msdn.com/khen1234/archive/2005/06/02/424228.aspx
I like using SQL Server Profiler as well. I like to setup a trace on a client site on their database server for a good 15-30 minute chunk of time in the midst of the business day and log all queries/stored procs with an duration > 100 milliseconds. That's my criteria anyway for "long-running" queries.