Clearing the SQL Server Analysis Services Cache

Preparing to do some MDX performance testing?  Step one for each and every test should be to clear the cache.  This will ensure you are seeing the performance results without the benefit of having data already loaded up in memory.  How do you empty the MS SQL Analysis Services cache prior to running your query?  Execute the following XML in a SQL Server Management Studio window:

<Batch xmlns="">
               <DatabaseID>Your Database Goes here </DatabaseID>

Thanks to Dustin Ryan at for this tip!

Leave a Reply

Your email address will not be published.