db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-4112) Make it possible to execute a statement with all considered plans
Date Mon, 23 Mar 2009 23:15:50 GMT
Make it possible to execute a statement with all considered plans
-----------------------------------------------------------------

                 Key: DERBY-4112
                 URL: https://issues.apache.org/jira/browse/DERBY-4112
             Project: Derby
          Issue Type: Improvement
          Components: SQL, Test
    Affects Versions: 10.6.0.0
            Reporter: Kathey Marsden
            Priority: Minor


Often we have bugs that occur only if a specific query plan is selected.  These are often
hard to reproduce or require a great deal of setup to reproduce the exact conditions of the
failed execution  (for example DERBY-3926).  It would be very helpful for debugging user reports
and also for expanding our testing, if there was a way to execute a query repeatedly with
the different plans considered and identify the failing one.

It would be slow, but Mike suggested maybe we could use optimizer directives to do this. If
the query plans were numbered from 1 to the number considered and then you had a directive
--DERBY-PROPERTIES QUERYPLAN=<N>  where N is the sequential number of the plan considered,
 the statement would just execute as soon as it had considered that many plans.  It could
throw an exception if N exceeded the number of considered plans.

 The calling test code could then just iterate until it identified the failing plan and look
for the exception to know it was finished.   If there was a problem with a plan the developers
could reliably re-execute with the failing plan to debug.

I think this could be a newcomer task with some guidance and would be a good low risk opportunity
to learn about the optimizer.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message