• I wouldn't suggest doing that. SQL manages the memory in cache just fine, and by clearing it you're removing any chance that pages needed by the night time work which are also needed by the day time would remain in cache.

    It's not queries that are cached, it's the raw data pages of the tables/indexes.

    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