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 "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2013/02/01 17:08:13 UTC

[jira] [Commented] (OAK-600) Query log tweaks

    [ https://issues.apache.org/jira/browse/OAK-600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13568831#comment-13568831 ] 

Alex Parvulescu commented on OAK-600:
-------------------------------------

bq. it might make sense to avoid logging repeated queries
Hmm, having a query log means that you log all queries, even the ones that you run insistently.

On the other hand the UUID lookup query log can get extremely verbose.
So far I'm not aware of any other query that would require the existence of such a 'buffer'. Maybe for this particular case we could introduce an exception of some sort, but I would keep this for a later time.
                
> Query log tweaks
> ----------------
>
>                 Key: OAK-600
>                 URL: https://issues.apache.org/jira/browse/OAK-600
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>    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