Re: SQL Server taking ages to compile a Stored Procedure

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 10/12/04


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 


Relevant Pages

  • Re: How do you do this?
    ... SwiftForth, VFX, gForth, bigForth, iForth, tforth, win32Forth, ... ANS Forth is too powerful to execute from an untrusted source without ... So one could also compile the code with optimization ...
    (comp.lang.forth)
  • How do you do this?
    ... and read and execute each Forth word. ... So one could also compile the code with optimization ... executed by the worker system. ...
    (comp.lang.forth)
  • Re: Bytecode
    ... Bytecode systems have various advantages. ... but the compression has both ... And it's very simple to compile ... execution tokens and a lookup table, and then execute or compile. ...
    (comp.lang.forth)
  • Re: An Observation
    ... Parse a word from the input stream and leave the ASCII value of its ... Quote a character so it's data, not the name of a word. ... The first part is in a pidgin in which no words execute at compile time. ...
    (comp.lang.forth)
  • Re: FORTH: BEGIN as compile-time and no run-time?!?!?!?!? Help
    ... BEGIN is executed at compile time to push on the stack an address ... > IMMEDIATE identifies words to be executed at compile time. ... > cases will either execute it or compile some reference to it depending on a ...
    (comp.lang.asm.x86)