You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <ji...@apache.org> on 2009/03/24 00:15:50 UTC

[jira] Created: (DERBY-4112) Make it possible to execute a statement with all considered plans

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.