You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (Jira)" <ji...@apache.org> on 2023/11/07 13:46:00 UTC

[jira] [Resolved] (OAK-10527) Improve readability of the explain query output

     [ https://issues.apache.org/jira/browse/OAK-10527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Mueller resolved OAK-10527.
----------------------------------
    Resolution: Fixed

> Improve readability of the explain query output
> -----------------------------------------------
>
>                 Key: OAK-10527
>                 URL: https://issues.apache.org/jira/browse/OAK-10527
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Major
>             Fix For: 1.60.0
>
>
> Currently the output "explain query" of Oak (the query plan) is hard to interpret.
> A more human-readable output would be better. Example:
> Old:
> {noformat}
> [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]) > '') */
> {noformat}
> New:
> {noformat}
> [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
>  */
> {noformat}
> 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:
> {noformat}
> 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])
> {noformat}
> New:
> {noformat}
> 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])
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)