Subject Re: [firebird-support] Query optimization help
Author Aage Johansen
Kjell Rilbe wrote:
> Aage Johansen wrote:
>
>>Kjell Rilbe wrote:
>> > As I understand it, the problem is that it will repeat the subquery for
>> > each record in the outer query and that the low index selectivity of the
>> > subquery indices causes these subqueries to execute rather sluggishly.
>>
>>Maybe not quite. I think Fb is waisting time on indexes which add less
>>than nothing to performance.
>
>
> Couldn't Firebird be made to detect this problem automatically? Or
> perhaps the way it evaluates index statistics could be adjusted to
> reduce that the risk of this occurring. It does happen in too many
> situations as it is now. It wouldn't be a big problem if it rarely
> happened, but now I seem to run into it on some 10-50% of all queries I
> create. I don't know about you, but I personally don't think that's good
> enough.

I don't see it too often - maybe I take these points into consideration as
I write SQL statments ... I think one must accept that optimisert aren't
infallible. Maybe you could support improvements in some way?

Try it with Fb2 (and Vulcan). If you feel there still are shortcomings you
could raise it in the devel list. Maybe Arno or someone else can tell you
why (or why not).


--
Aage J.