Stored procs run slow
From: Danny J. Lesandrini (dlesandrini_at_hotmail.com)
Date: 05/13/04
- Next message: Antonin Koudelka: "Replication problem"
- Previous message: Sue Hoegemeier: "Re: Corrupt backup - "An internal consistency error occurred", code 42000"
- Next in thread: Andrew J. Kelly: "Re: Stored procs run slow"
- Reply: Andrew J. Kelly: "Re: Stored procs run slow"
- Reply: Julie: "Stored procs run slow"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 May 2004 19:17:34 -0600
Briefly, stored procs that run fast on other machines are taking 20
to 30 times longer on one client's server. If I extract the actual
SQL Select from the proc and run it with hard coded parameter
values, it returns quickly, but the proc takes forever.
Anyone ever heard of this before? Do I need to recompile the
whole batch of stored procs? If so, how do I do that.
<<< The more verbose question, if you need more information >>>
I've deployed a .Net-Crystal reporting tool on a number of clients. The
data is always in SQL Server and is returned using Stored Procs.
I'm not doing anything fancy. The procs are simple. For example ...
Each proc builds a temp table of ProjectIDs for filtering results, but
there are no cursors at all. I'm joining 4 tables or less and doing
some aggregations with calculations, such as converting seconds to
minutes and summing across projects and Agents.
I've run these procs on various sized databases and they usually return
results in less than 30 seconds. Yesterday I ran across a server that
required 7 minutes to return the same results on a similar number of rows.
This problem database is large, being about 6 gig. It's a dual processor
with a ton of RAM. There's plenty of disk space. I've checked for and
found all required indexes. I ran sp_updatestats and even ran the
update statistics on the problem table with the option to do a full update.
As I mentioned, when I extract the actual SQL SELECT and run it with
filter criteria hard coded, the results returns very, very quickly. It's
just
the proc that runs slow ... and ALL of them run slow.
Any ideas?
Thanks
Danny J. Lesandrini
dlesandrini@hotmail.com
http://www.amazecreations.com/datafast
- Next message: Antonin Koudelka: "Replication problem"
- Previous message: Sue Hoegemeier: "Re: Corrupt backup - "An internal consistency error occurred", code 42000"
- Next in thread: Andrew J. Kelly: "Re: Stored procs run slow"
- Reply: Andrew J. Kelly: "Re: Stored procs run slow"
- Reply: Julie: "Stored procs run slow"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|