• a4apple (7/6/2015)


    Hello everyone,

    I have a stored procedure which is nested. I have local variables defined to avoid parameter sniffing in both the procedures too.

    Proc A calls PROC B, PROC C, PROC D.

    PROC C WHEN ran Individually takes a time of 20 seconds.

    When PROC A is called, PROC C takes 86 seconds. Data is the same.

    Any ideas what can cause this? tried to recompile the proc which didn't give me any results too... Thanks for your time.

    Quick question, can you post the actual execution plans for the two different executions of proc C?

    😎