Re: Procedure execution problem - Clients performances
- From: "Andrew J. Kelly" <sqlmvpnooospam@xxxxxxxxxxxx>
- Date: Thu, 13 Dec 2007 16:30:31 -0500
Exactly how are you calling it in SSMS? Can you show the exact code? In ..net you are defining the datatypes and in SSMS it may be guessing. Plus it will be an RPC call in .net vs. a Batch in SSMS and will get two plans which may or may not be the same.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Robson Luiz" <robsonbr_2004@xxxxxxxxxxxx> wrote in message news:e2Ohe0cPIHA.4272@xxxxxxxxxxxxxxxxxxxxxxx
But it still strange..
Same procedure with same parameters executes in 1 sec in sql management studio and get me timeout when executed in a .net application using sqlclient.
but if i recompile the SP in SSMS both cases work well.
But after a time the problem repeats.. I see SSMS is not sensitive to query plan as sqlclient is.
Robson
Robson
"Andrew J. Kelly" <sqlmvpnooospam@xxxxxxxxxxxx> wrote in message news:OR2OQMbPIHA.5164@xxxxxxxxxxxxxxxxxxxxxxxSounds like parameter sniffing issue. Have a look at these:
http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx
http://blogs.msdn.com/queryoptteam/archive/2006/03/31/565991.aspx
http://omnibuzz-sql.blogspot.com/2006/11/parameter-sniffing-stored-procedures.html
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Robson Luiz" <robsonbr_2004@xxxxxxxxxxxx> wrote in message news:%23mBc09ZPIHA.280@xxxxxxxxxxxxxxxxxxxxxxxHello people.
I have a strange behaviour with a stored procedure.
Using management studio procedure executes in 1 second.
Using a .net application (VS 2005) with sqlclient same procedure get me a timeout execution..
Any help???
Best
Robson
.
- Follow-Ups:
- Re: Procedure execution problem - Clients performances
- From: Robson Luiz
- Re: Procedure execution problem - Clients performances
- References:
- Procedure execution problem - Clients performances
- From: Robson Luiz
- Re: Procedure execution problem - Clients performances
- From: Andrew J. Kelly
- Re: Procedure execution problem - Clients performances
- From: Robson Luiz
- Procedure execution problem - Clients performances
- Prev by Date: Re: Procedure execution problem - Clients performances
- Next by Date: Re: Procedure execution problem - Clients performances
- Previous by thread: Re: Procedure execution problem - Clients performances
- Next by thread: Re: Procedure execution problem - Clients performances
- Index(es):
Relevant Pages
|
Loading