Army wrote:
If you're in a situation where you have to use printlns, you may want
to start by printing out the contents of the bestJoinOrder array in
OptimizerImpl in two places: 1) at the end of rememberBestCost(), and
2) at the end of modifyAccessPaths(). The former tells you every time
the OptimizerImpl thinks it has found a new "best join order" thus far
in processing, the latter tells you what the OptimizerImpl's _final_
choice of "best join order" was. If you print out the cost of the
join orders (bestCost) as well, and then compare the results from a
"fail" plan and a "pass" plan, that might give you an indication of
where to start. But as I said, there's no silver bullet in tracking
that kind of thing down...
Well I finally got the printlns with the failing and passing runs. It
seemed much less likely to happen once I put them in, but eventually I
got a hit, but I don't think I am understanding what I am seeing. I
expected to see large costs with the failing run. But I think I messed
up and printed the current cost instead of the best cost, so I will try
to print that out too and see what happens.
Kathey