.Net Sql Client Provider

Posted by sameer on Stack Overflow See other posts from Stack Overflow or by sameer
Published on 2012-11-30T11:02:44Z Indexed on 2012/11/30 11:03 UTC
Read the original article Hit count: 136

Filed under:
|
|

Have come across a situation where in, if a stored procedure is executed in Query Analyser its execution time is less than a second. But when same Stored Procedure is executed using .NET Sql Client Provide. it is taking 61 seconds.

Therefore inorder to troubleshoot this issue we went to SQL Profiler we find the request come to SQL Server less then a second but execution completed after 60 seconds.

Can anybody suggest why we have such a deviation.

Query is a simple as give below

SELECT distinct p1.productID, p1.description
FROM Details V
INNER JOIN Product P
ON V.ProductID=P.ProductID
INNER JOIN product p1 on p1.productID=p.parentID
WHERE V.MarketID='1159' AND
V.FinancialYear='1213' AND
V.LEPeriodID= '75' AND
p1.parentID=100024 AND
p1.statusID = 1
ORDER BY description

© Stack Overflow or respective owner

Related posts about .NET

Related posts about sql