Thomas Mueller created OAK-10527:
------------------------------------
Summary: 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
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)