Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-10527

Improve readability of the explain query output

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.60.0
    • query
    • None

    Description

      Currently the output "explain query" of Oak (the query plan) is hard to interpret.
      A more human-readable output would be better. Example:

      Old:

      [nt:base] as [nt:base] /* lucene:slingResourceResolver-1(/oak:index/slingResourceResolver-1) sling:vanityPath:[* TO *] sync:(sling:vanityPath is not null) where ([nt:base].[sling:vanityPath] is not null) and (first([nt:base].[sling:vanityPath]) > '') */
      

      New:

      [nt:base] as [nt:base] /* lucene:slingResourceResolver-1
          indexDefinition: /oak:index/slingResourceResolver-1
          estimatedEntries: 46
          luceneQuery: sling:vanityPath:[* TO *]
          synchronousPropertyCondition: sling:vanityPath is not null
       */
      

      Also, the formatting of the logged query statement should be improved: instead of one single line with the whole statement, the statement should contain line breaks before the important keywords. Example:

      Old:

      Parsing JCR-SQL2 statement: explain SELECT [sling:vanityPath], [sling:redirect], [sling:redirectStatus] FROM [nt:base] WHERE NOT isdescendantnode('/jcr:system') AND [sling:vanityPath] IS NOT NULL AND FIRST([sling:vanityPath]) > '' ORDER BY FIRST([sling:vanityPath])
      

      New:

      Parsing JCR-SQL2 statement: explain SELECT [sling:vanityPath], [sling:redirect], [sling:redirectStatus]
        FROM [nt:base]
        WHERE NOT isdescendantnode('/jcr:system')
        AND [sling:vanityPath] IS NOT NULL
        AND FIRST([sling:vanityPath]) > ''
        ORDER BY FIRST([sling:vanityPath])
      

      Attachments

        Issue Links

          Activity

            People

              thomasm Thomas Mueller
              thomasm Thomas Mueller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: