Re: slowing/halting stored procedure from ado.net
- From: MarcelG <MarcelG@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 16 Apr 2008 02:15:00 -0700
William,
Thanks for your reply, but at the time when calling from the application
(through ado.net), calling the same stored procedure from SQL Management
Studio goes without any slowdown, subzero performance.
There was/is no big job running on the sql server, nothing blocking etc.
Would a query plan for calling from ado.net be different than from calling
it from SQL Management Studio?
BTW:loved your book!
Marcel
"William Vaughn [MVP]" wrote:
Erratic performance of any query is usually due to something changing. For.
example:
a.. A query plan that does not match the operations being requested.
This is caused by the system generating a QP based on a set of a
parameters that might work for the first invocation, but the next
execution (or the problem execution) the cached plan does not match the
operations dictated by the subsequent parameters or the state of the
statistics (what's in the DB). Best idea? Simplify the procedure (break it
into smaller pieces) whose QPs are not dependent on the vagarities of the
parameters--or don't accept parameters that break the QP.
b.. The query (when it slows down) might be blocked by some other
operation that's holding a resource that's competing or colliding with the
resources needed by the SP.
c.. The system might be busy when the query is being run. For example,
it might be loaded up with another application that flushes the data
cache, competes for disk IO, RAM or CPU time. Examples? A print job, a
reporting services job, a backup, almost anything that steals
resources--including your own application and another connection.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
__________________________________________________________________________
__________________
"MarcelG" <MarcelG@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A5E650CF-C2BE-4E15-9279-0B23A5540B6B@xxxxxxxxxxxxxxxx
Hi,2008/ADO.NET
I've strange problem with an application developed with VB.NET
framework target 2.0 and SQL Server 2005.Studio
Sometimes a certain stored procedure wich normally executes in seconds,
suddenly takes forever (15minutes plus).
When I execute the stored procedure from within SQL Server Management
it always executes fast (42000+ records in 1 second), even when fromADO.NET
it takes forever.breaks
When the slowdown appears, restarting the application does not help.
When I do modify/execute in man.studio, the slowdown goes away, and
application does it normal quick response.
Activity monitor show no blocking other queries.
The stored procedure is called with a command object and an dataadapter
filling a dataset. When I break the application in visual studio, it
on the da.fill(ds) line.
I cannot find any pattern in when the slowdown starts, sometime once a
week, once a day or 3 weeks without a problem.
Records added to the table are about 45 records per day (mean).
Can anyone shed some light on this problem??
- Follow-Ups:
- Re: slowing/halting stored procedure from ado.net
- From: William Vaughn [MVP]
- Re: slowing/halting stored procedure from ado.net
- From: Cor Ligthert[MVP]
- Re: slowing/halting stored procedure from ado.net
- References:
- slowing/halting stored procedure from ado.net
- From: MarcelG
- slowing/halting stored procedure from ado.net
- Prev by Date: SqlCommand.ExecuteReader takes too much time
- Next by Date: Re: OracleClient, Oracle 10g, Connection failure
- Previous by thread: slowing/halting stored procedure from ado.net
- Next by thread: Re: slowing/halting stored procedure from ado.net
- Index(es):
Relevant Pages
|
Loading