}
/** @see Optimizable#rememberJoinStrategyAsBest */
public void rememberJoinStrategyAsBest(AccessPath ap)
{
Optimizer optimizer = ap.getOptimizer();
ap.setJoinStrategy(getCurrentAccessPath().getJoinStrategy());
optimizer.trace(Optimizer.REMEMBERING_JOIN_STRATEGY, tableNumber, 0, 0.0,
getCurrentAccessPath().getJoinStrategy());
if (ap == bestAccessPath)
{
optimizer.trace(Optimizer.REMEMBERING_BEST_ACCESS_PATH_SUBSTRING,
tableNumber, 0, 0.0, ap);
}
else if (ap == bestSortAvoidancePath)
{
optimizer.trace(Optimizer.REMEMBERING_BEST_SORT_AVOIDANCE_ACCESS_PATH_SUBSTRING,
tableNumber, 0, 0.0, ap);
}
else
{
/* We currently get here when optimizing an outer join.
* (Problem predates optimizer trace change.)
* RESOLVE - fix this at some point.
if (SanityManager.DEBUG)
{
SanityManager.THROWASSERT(
"unknown access path type");
}
*/
optimizer.trace(Optimizer.REMEMBERING_BEST_UNKNOWN_ACCESS_PATH_SUBSTRING,
tableNumber, 0, 0.0, ap);
}
}