June 22, 2007 at 1:49 pm
I have a stored procedure that jumps from 1000 CPU in profiler to 5000 CPU and stays there. If I recompile the proc, it goes back down to 1000 for a few days. Any ideas on this one?
Cal
June 22, 2007 at 1:53 pm
Sorry, left out details...
SQL 2000 Enterprise SP3a
Database is currently a subscription of a published database on another server. Stored procedures are NOT being replicated.
Calvin
June 22, 2007 at 9:53 pm
What if you add WITH RECOMPILE at the end of the procedure? I would be interested to know if you still get the same result with this option.
Herve Roggero
hroggero@pynlogic.com
MCDBA, MCSE, MCSD
SQL Server Database Proxy/Firewall and Auditing
June 24, 2007 at 9:33 pm
I will give it a try. I suspected that maybe the only option left.
Cal
June 24, 2007 at 11:36 pm
There might be something else going on, but can't tell unless you post the sproc
--Jeff Moden
Change is inevitable... Change for the better is not.
June 26, 2007 at 7:50 am
Please also post execution parameters that cause 1000cpu and others that make it jump to 5000. It could well be parameter sniffing and one or more situations cause it to get a 'bad' query plan.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 28, 2007 at 6:51 pm
Post proc as something may be in the proc that forces a recompile and subsequently introduces the elevated CPU util.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply