locked
How do I clear the warm cache of a cube? RRS feed

  • General discussion

  • [This is just for sharing information for those common asked questions collected from forums. If you have any better way or feedback, please directly reply in this thread so that community users can benefit from your answers.]

    Answer:

    Sometimes you need to clear the warm cache of a cube so as to compare the query performance between using the cache and not. In this case, you can run the following XMLA script to clear it.

     

    <Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">

      <ClearCache>

        <Object>

          <DatabaseID>Adventureworks</DatabaseID>

          <CubeID>Sales</CubeID>

        </Object>

      </ClearCache>

    </Batch>

     

    Note: Please change the DatabaseID and CubeID to your DatabaseID and CubeID accordingly.

     

    You can execute it in SQL Server Management Studio (SSMS). Open SSMS, connect to the Analysis Services instance, click File->New->Analysis Services XMLA Query, and input the XMLA script as followsand execute it.

     

    After you clear the cache, it is recommended that you execute the following MDX query to reload the MDX script without loading any data in the cache:

    SELECT {} ON 0

    FROM [cube name]


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, June 21, 2010 1:26 PM