• Jackrabbit 2.4.x supports 4 query languages - XPATH, SQL (both deprecated since JCR 2.0) as well as the new JCR_JQOM and JCR_SQL2
  • XPATH (and SQL?) queries use a completely different query mechanism to retrieve data
  • XPATH does NOT support sort by (node) name yet
  • as of today AQM implementation is significantly slower than QueryImpl (see examples) - especially because it's not yet using lucene sort
  • parsing string to JQOM (e.g. when providing the JQOM query in SQL2 syntax) is fast - no real gain by manually creating the QueryObjectModel (although this might be easier in certain cases)
  • in the future (as soon as QueryObjectModelImpl is performant enough?) XPATH and SQL should also use the AQM


An easy way to analyze performance of "old" and "new" queries is to add the following lines your log4j.xml:

<!-- Analyze XPATH queries -->
<category name="org.apache.jackrabbit.core.query.QueryImpl">
  <priority value="DEBUG" />

<!-- Analyze JCR_JQOM / JCR_SQL2 queries -->
<category name="org.apache.jackrabbit.core.query.QueryObjectModelImpl">
  <priority value="DEBUG" />


  • No labels