• joe.arias (8/25/2015)


    DBCC FreeProcCache does clear sys.dm_exec_query_stats

    If you are testing and tuning for performance, this can be invaluable way to save time.

    It does, but it doesn't clear any other DMVs (other than the related sys.dm_exec_procedure/function_stats).

    To be honest, unless I'm testing the effects of parameter sniffing, I've never seen a need or use for clearing the entire procedure cache. Recompiling the query/procedure I'm working on, yes maybe, but an ALTER PROCEDURE does that.

    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