Calculate time to execute MDX query

  • How to get time taken by a MDX query to execute?

    In QueryLog table Duration is in second. My query takes milliseconds to execute. So in duration field it is rounded to 0 second.

  • Have you tried using this and running the query manually:

    set statistics time on

     

  • Hi Mark,

    Thanks for reply.

    How can I use "set statistics time on" for MDX query?

  • Sorry, my mistake, I wasn't paying close enough attention to your question.

    From my understanding of Analysis Services 2005, the Duration column within the Query Log table is in milliseconds.

    http://www.microsoft.com/technet/prodtechnol/sql/2005/technologies/config_ssas_querylog.mspx

    ColumnData TypeDescription

    MSOLAP_Database

    Nvarchar 255

    The ID of the database used in the query.

    MSOLAP_Path

    Nvarchar 400

    The path to the partition.

    MSOLAP_User

    Nvarchar 255

    The name of the user who ran the query.

    Dataset

    Nvarchar 4000

    A numeric string indicating the attribute from each dimension used to satisfy the query.

    StartTime

    datetime

    The time the query began

    Duration

    Bigint

    The length of time (in milliseconds) of the query execution.

    Also, when using the SQL Server Profiler to monitor Analysis Services, the Query End Class Analysis Services event has a CPUTime column that contains the amount of CPU time (in milliseconds) used by the process between the time of the query begin event and the query end event.

    http://msdn2.microsoft.com/en-us/library/ms174472.aspx

     

  • I just realized from looking at your other post, that you're using Analysis Services 2000, which does report only seconds within the duration column.

    Rather than have two discussions going for the same purpose, I'll continue responding within the other thread.

    -Mark

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply