db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Lichtman <swa...@rcn.com>
Subject Re: [OPTIMIZER] OptimizerImpl "best plans" for subqueries?
Date Fri, 17 Feb 2006 22:40:49 GMT

>The optimizer will have to remember this best plan even when it 
>considers a different join order for the outer query, because it's 
>possible that the subquery's best plan for that optimization will be 
>the best one overall.

It occurs to me that the code structure already supports this. Every 
time the optimizer figures out the best access path for an 
optimizable in the context of a join order it's considering, it tells 
the optimizable to remember that access path as the "best," and when 
it finds a complete plan that's the best so far, it tells the 
optimizable to remember it as "truly the best." When optimizing an 
outer query containing a table subquery, the "best" and "truly the 
best" access paths for the subquery should be the complete plan for 
the subquery from the current (or latest) optimization of it.

                        -        Jeff Lichtman
                                 Check out Swazoo Koolak's Web Jukebox at

View raw message