|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
query running slowI have a query which runs under 15 sec. through query analyzer. But when
same query is getting executed by .net console application, using ado.net, it takes 10-15 min. What can be the problem? vicky,
How are you executing this query from your application, using a stored procedure or sending the statement to SQL Server? AMB Show quote "vicky" wrote: > I have a query which runs under 15 sec. through query analyzer. But when > same query is getting executed by .net console application, using ado.net, > it takes 10-15 min. What can be the problem? > > > i am executing store procedure from both QA as well as .net app. with same
param. Even i can see .net app SPID in sysprocess running for long in runnable state Show quote "Alejandro Mesa" <AlejandroM***@discussions.microsoft.com> wrote in message news:DAFF7A78-AC5D-4D64-B02E-92D09FEC10C8@microsoft.com... > vicky, > > How are you executing this query from your application, using a stored > procedure or sending the statement to SQL Server? > > > AMB > > "vicky" wrote: > >> I have a query which runs under 15 sec. through query analyzer. But when >> same query is getting executed by .net console application, using >> ado.net, >> it takes 10-15 min. What can be the problem? >> >> >> Use Profiler to see what exactly is executed by your app. Also see if you have the same execution
plans when executing the query from QA vs. your app. -- Show quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "vicky" <v@v.com> wrote in message news:%23%23B3bVHnGHA.1248@TK2MSFTNGP05.phx.gbl... >I have a query which runs under 15 sec. through query analyzer. But when same query is getting >executed by .net console application, using ado.net, it takes 10-15 min. What can be the problem? > i am executing store procedure from both QA as well as .net app. with same
param. Even i can see .net app SPID in sysprocess running for long in runnable state. Show quote "Tibor Karaszi" <tibor_please.no.email_kara***@hotmail.nomail.com> wrote in message news:uS3O2zHnGHA.4352@TK2MSFTNGP02.phx.gbl... > Use Profiler to see what exactly is executed by your app. Also see if you > have the same execution plans when executing the query from QA vs. your > app. > > -- > Tibor Karaszi, SQL Server MVP > http://www.karaszi.com/sqlserver/default.asp > http://www.solidqualitylearning.com/ > > > "vicky" <v@v.com> wrote in message > news:%23%23B3bVHnGHA.1248@TK2MSFTNGP05.phx.gbl... >>I have a query which runs under 15 sec. through query analyzer. But when >>same query is getting executed by .net console application, using ado.net, >>it takes 10-15 min. What can be the problem? >> > Still, see what exact SQL is submitted by your app. And, most important, see if the execution plans
are the same. -- Show quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "vicky" <v@v.com> wrote in message news:%23pZLt6HnGHA.1244@TK2MSFTNGP05.phx.gbl... >i am executing store procedure from both QA as well as .net app. with same param. Even i can see >.net app SPID in sysprocess running for long in runnable state. > > "Tibor Karaszi" <tibor_please.no.email_kara***@hotmail.nomail.com> wrote in message > news:uS3O2zHnGHA.4352@TK2MSFTNGP02.phx.gbl... >> Use Profiler to see what exactly is executed by your app. Also see if you have the same execution >> plans when executing the query from QA vs. your app. >> >> -- >> Tibor Karaszi, SQL Server MVP >> http://www.karaszi.com/sqlserver/default.asp >> http://www.solidqualitylearning.com/ >> >> >> "vicky" <v@v.com> wrote in message news:%23%23B3bVHnGHA.1248@TK2MSFTNGP05.phx.gbl... >>>I have a query which runs under 15 sec. through query analyzer. But when same query is getting >>>executed by .net console application, using ado.net, it takes 10-15 min. What can be the problem? >>> >> > > |
|||||||||||||||||||||||