Henry Saginor
- querylog.jar.zip - Click Here to download.
Jul 24, 2012
How to find long running queries.
Posted by Henry Saginor
Inefficient JCR queries can often be the cause of poor performance. So how do you find queries that take too long to execute?
In CQ 5.5 you can login to Felix Console. Then go to JMX tab and click on QueryStat MBean.
In older versions of CQ you can enable additional logging as described in the Knowledge Base article How to debug JCR Queries.
Once you have query logging you can sort this log file using querylog.jar to find queries with longest execution time. Bellow is an examle of how to use this.
java -Xmx512m -jar querylog.jar query.log > query_sorted.log