• If there's a select in the batch (which I've seen friom some apps), then the select portion gets a plan, but the EXEC portion has no plan, the plan for the procedure is separate and is the one you see with the text of 'CREATE PROCEDURE', and is reused.

    Has a select in, as in has a form kinda, something like

    EXEC SomeProc @Param1, @Param2 OUTPUT; select @Param2

    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