Subject | Re: [firebird-support] Query plan insists on NOT USING an index |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2007-07-04T20:29:30Z |
Franz J Fortuny wrote:
not understand about Firebird. I would understand if the INNER JOIN was
joined to a LEFT JOINed table or group, but when it is JOINed to one of
the other tables, I do not understand why the optimizer doesn't treat
this the same regardless of whether it is before or after LEFT JOINs in
the query. It's a long time since I started putting LEFT JOINs at the
end of my queries and haven't experienced practical problems with this,
but your example of inner joining a view that contains left joins is
certainly a good example of why this may be of greater importance than I
thought.
Set
> So, today's lesson, for me, is simply that any JOIN after you haveIf this is still true for Fb 2, that is actually one of the things I do
> placed LEFT OUTER JOINS will not use the proper indexes, and if you
> need such thing, then you must place the JOIN BEFORE the "left outer"
> JOINS.
not understand about Firebird. I would understand if the INNER JOIN was
joined to a LEFT JOINed table or group, but when it is JOINed to one of
the other tables, I do not understand why the optimizer doesn't treat
this the same regardless of whether it is before or after LEFT JOINs in
the query. It's a long time since I started putting LEFT JOINs at the
end of my queries and haven't experienced practical problems with this,
but your example of inner joining a view that contains left joins is
certainly a good example of why this may be of greater importance than I
thought.
Set