[Mondrian] retrieve currently executing sql queries

Matt Campbell mcampbell at pentaho.com
Mon Mar 11 10:58:23 EDT 2013

I believe the statement ID you retrieve from the monitor is the same one that gets logged.  So you should be able to check the ID of any queries still executing and locate them in the logs.

E.g. id 202 in this logged entry:
   DEBUG [mdx] 202: select [Gender].[Gender].Members ON COLUMNS

Alternatively, just look at the logs for queries that have started but not finished.

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Domen Pogacnik
Sent: Monday, March 11, 2013 10:10 AM
To: mondrian at pentaho.org
Subject: Re: [Mondrian] retrieve currently executing sql queries

I know about sql and mdx log, but I would actually like to get the current state of Mondrian i.e. which queries / mdx statements / tasks are currently in execution.

To better understand my problem, I often get the following error:

Mondrian Error:The number of concurrent MDX statements which can be processed simultaneously by this Mondrian server instance has been reached. Set 'mondrian.rolap.maxQueryThreads' to change the current limit.

All the consequential mdx queries after that error fails to execute (even if I wait for 300s). I suspect that there are MDX queries which fail to finish and I would like to see which.


Date: Fri, 8 Mar 2013 13:10:01 -0600
From: Matt Campbell <mcampbell at pentaho.com<mailto:mcampbell at pentaho.com>>
Subject: Re: [Mondrian] retrieve currently executing sql queries
To: Mondrian developer mailing list <mondrian at pentaho.org<mailto:mondrian at pentaho.org>>
        <60DAC7BD8D63084E8252254DF3F1102009B4206981 at MBX36.exg5.exghost.com<mailto:60DAC7BD8D63084E8252254DF3F1102009B4206981 at MBX36.exg5.exghost.com>>
Content-Type: text/plain; charset="us-ascii"

A simple option is to turn on DEBUG logging in your log4j.xml.  Setting both mondrian.sql and mondrian.mdx to DEBUG is often useful.

   <category name="mondrian.sql">
      <priority value="DEBUG"/>
      <appender-ref ref="SQLLOG"/>

   <category name="mondrian.mdx">
      <priority value="DEBUG"/>
      <appender-ref ref="MDXLOG"/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20130311/cdc63836/attachment.html 

More information about the Mondrian mailing list