Subject Re: [IB-Architect] Firebird Query Speed improvement
Author Dmitry Kuzmenko
Hello, Jim!

Jim Starkey wrote:

> Interbase had a cost base optimizer (I made the standard mistakes
> on earlier systems). It worked fine. Somebody (we'll leave his
> name out) tried to teach it a new trick by embedded a piece of
> heuristic. It solved his test case but broke the general case.

> Somebody needs to make one of the many cases where the optimizer
> gets the wrong answer and find out why it failed then fix it.

Anyway, I have a test case when 2 databases with the same data
gives different plans. If I change bad plan at DB 1 to the good plan
from DB2, query time will be same and the best.
So, we have case when optimizer incorrectly uses cost estimation.

I've tried to understand what is happening in OPT.C (at least
added some lines to extend debug output, for example to know
relation names), but this not helped for me.

> cost to prune the tree), then optimizes the resulting join order.
> Just a little C code. It doesn't bite.

I'm not C programmer...

--
Dmitry Kuzmenko, Epsylon Technologies.