This issue has stumped me for a while. Hopefully someone here can give me some insight.
When my site runs the following code it works just fine 99% of the time. Dim sda As New Data.SqlClient.SqlDataAdapter(cmd)
Dim ds As New Data.DataSet
Catch ex As Exception ...
The command is calling a SQL Server 2005 stored procedure that takes 20 parameters and returns 6 tables of about 5-50 rows each. The paramters are all NVARCHAR, INT, or BIT data types. Only one of the parameters is Input/Output. There is a total of about 100 rows returned. Normally this takes a fraction of a second, but for some queries, it times out after 30 seconds.
When I run the exact same query in the Management Studio query window it takes 1 second.
Any idea what I can do to get the same performance from .Net as I am getting from Management Studio?
View Complete Post