Alex Parvulescu created OAK-600:
-----------------------------------

             Summary: Query log tweaks
                 Key: OAK-600
                 URL: https://issues.apache.org/jira/browse/OAK-600
             Project: Jackrabbit Oak
          Issue Type: Improvement
    Affects Versions: 0.6
            Reporter: Alex Parvulescu
            Assignee: Alex Parvulescu
            Priority: Minor


There are a few nuisances when is comes to the current state of query related 
logs.

This is how a query log looks like now (on debug):
{code}
o.a.j.o.query.QueryEngineImpl plan: [nt:base] as [nt:base] /* p2 
jcr:uuid=21232f29-7a57-35a7-8389-4a0e4a801fc3 where [nt:base].[jcr:uuid] = $id 
*/
o.a.j.o.query.QueryEngineImpl Parsing JCR-SQL2 statement: SELECT * FROM 
[nt:base] WHERE [jcr:uuid] = $id
o.a.j.o.query.QueryEngineImpl cost using filter query SELECT * FROM [nt:base] 
WHERE [jcr:uuid] = $id
path: ///*
property jcr:uuid: 
[21232f29-7a57-35a7-8389-4a0e4a801fc3..21232f29-7a57-35a7-8389-4a0e4a801fc3]

o.a.j.o.query.QueryEngineImpl cost for p2 is 1.0
o.a.j.o.query.QueryEngineImpl cost for nodeType is Infinity
o.a.j.o.query.QueryEngineImpl cost for traverse is 1.0E7
o.a.j.o.query.QueryEngineImpl plan: [nt:base] as [nt:base] /* p2 
jcr:uuid=21232f29-7a57-35a7-8389-4a0e4a801fc3 where [nt:base].[jcr:uuid] = $id 
*/
{code}

So:
 - Query logs under the QueryEngineImpl logger (should be moved under it own 
logger)

 - there is no log that just logs the query, there is the 'Parsing JCR-SQL2 
statement' but that is somewhat misleading (should add a simple query statement 
log under the Query logger)

 - 'plan: ' is inconsistent with the other 'cost' type of logs, should just be 
'plan', no colon.

 - 'cost using filter' statement logs the filter on multiple lines, one of 
which is an empty one. all the info should be inlined, otherwise parsing the 
logs turns into a nightmare

 - single property conditions on filters are too verbose: 'property jcr:uuid: 
[21232f29-7a57-35a7-8389-4a0e4a801fc3..21232f29-7a57-35a7-8389-4a0e4a801fc3]' 
(should just be 'property jcr:uuid=...' it is an equals statement after all)





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to