db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6211) Make Optimizer trace logic pluggable.
Date Fri, 03 May 2013 15:40:16 GMT

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

Rick Hillegas updated DERBY-6211:
---------------------------------

    Attachment: derby-6211-02-aa-cleanup.diff

Attaching derby-6211-02-aa-cleanup.diff. This patch removes some unused code related to optimizer
tracing. This patch also tries to clean up the confusing and brittle division of tracing responsibility
currently split between the optimizer itself and the LanguageConnectionContext. I am running
tests now.

The following changes are made:

1) Removes the unused and unusable support for html formatting of optimizer traces. Once I
have implemented an xml-formatted tracer, it should be easy to follow its pattern in order
to write an html-formatted tracer--in case anyone really wants html.

2) Centralizes tracing responsibility in the LanguageConnectionContext. The LCC now has only
3 methods related to optimizer tracing and the optimizer itself retrieves the tracer from
the LCC:

    setOptimizerTracer()
    getOptimizerTracer()
    optimizerTracingIsOn()



Touches the following files:

----------------------

M       java/tools/org/apache/derby/impl/tools/optional/OptimizerTracer.java
M       java/engine/org/apache/derby/iapi/sql/compile/OptTrace.java
M       java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
M       java/engine/org/apache/derby/iapi/db/OptimizerTrace.java
M       java/engine/org/apache/derby/impl/sql/GenericStatement.java
M       java/engine/org/apache/derby/impl/sql/compile/DefaultOptTrace.java
M       java/engine/org/apache/derby/impl/sql/compile/Level2OptimizerImpl.java
M       java/engine/org/apache/derby/impl/sql/compile/OptimizerImpl.java
M       java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java

                
> Make Optimizer trace logic pluggable.
> -------------------------------------
>
>                 Key: DERBY-6211
>                 URL: https://issues.apache.org/jira/browse/DERBY-6211
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.11.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-6211-01-aa-createPlugin.diff, derby-6211-02-aa-cleanup.diff
>
>
> Right now the trace logic in the optimizer is hard-coded to produce a stream of diagnostics.
It would be good to be able to plug alternative trace logic into the optimizer. This would
make the following possible:
> 1) Plug in trace logic which produces formats which are easier to study and which can
be analyzed mechanically. E.g., xml formatted output.
> 2) Plug in trace logic which can be used during unit testing to verify that the optimizer
has picked the right plan. Over time this might make it easier to migrate canon-based tests
to assertion-based tests.

--
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

Mime
View raw message