how temp tables are assocated to deffred recompilation.

  • hi,

    1) "Deferred compile" recompile event occurs because of deferred name resolution. In other words, an

    object referred to in the statement does not exist at compile time. Later, when the object does exist, it

    requires a recompile of the statement so that it can create an optimal execution plan. One example of

    when a deferred compile will occur is if a temporary table is used in a batch and does not exist when the

    first statements in the batch are compiled.

    is there any solution to the problem.

    yours sincerly

  • What problem? Deferred compile isn't a problem, it's a feature.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I agree with Gail. What problem are you actually having? Is there some sort of a performance problem that you're trying to fix?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply