Re: SQL Server taking ages to compile a Stored Procedure
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 10/12/04
- Next message: Tibor Karaszi: "Re: Trouble renaming a column"
- Previous message: Aaron [SQL Server MVP]: "Re: anybody has an age calculation function ready ?"
- In reply to: Darren: "SQL Server taking ages to compile a Stored Procedure"
- Next in thread: Darren: "Re: SQL Server taking ages to compile a Stored Procedure"
- Reply: Darren: "Re: SQL Server taking ages to compile a Stored Procedure"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 12 Oct 2004 21:48:42 +0200
Obvious, I guess, but have you considered to try adding hints here and there in the procedure to
hunt down if there is a particular query that takes this long time?
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "Darren" <ozy_osborne@hotmail.com> wrote in message news:877b0de.0410120951.5d781fef@posting.google.com... > We have over 2000 stored procedures. Only one is causing a problem. > Its probably one of the more complicated ones we have (BUT NOT THE > MOST COMPLICATED!). > > The problem is that it takes 2 minutes to compile. (At least that is > what I think it is doing!). When we execute it for the first time, it > alway takes this extra 2 minutes to execute. If we create it using the > WITH RECOMPILE statement, then every time it gets executed it takes an > extra two minutes! > > Once 'compilied' the sproc executes in around 8 seconds. > > I'm no stranger to complex queries, but I've never experienced a delay > of this magnitude on first execution before. Has anyone else ever seen > it?? > > Thanks in advance
- Next message: Tibor Karaszi: "Re: Trouble renaming a column"
- Previous message: Aaron [SQL Server MVP]: "Re: anybody has an age calculation function ready ?"
- In reply to: Darren: "SQL Server taking ages to compile a Stored Procedure"
- Next in thread: Darren: "Re: SQL Server taking ages to compile a Stored Procedure"
- Reply: Darren: "Re: SQL Server taking ages to compile a Stored Procedure"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|