Subject | Re: Optimizer issue with left outer joins? |
---|---|
Author | Svein Erling |
Post date | 2004-03-24T12:11:30Z |
Changing to
SELECT
phone.*
from phonlink
INNER JOIN phone
ON phone.phoneref = phonlink.phoneref+0 //'+0' is the difference
left outer join emailoptions
ON phone.emailtype = emailoptions.emailtype
WHERE phonlink.loclinkref = 'LO00000004'
could solve your immediate problem. Though try Fb 1.5 as Carlos
recommended you to see if that makes a difference.
Set
SELECT
phone.*
from phonlink
INNER JOIN phone
ON phone.phoneref = phonlink.phoneref+0 //'+0' is the difference
left outer join emailoptions
ON phone.emailtype = emailoptions.emailtype
WHERE phonlink.loclinkref = 'LO00000004'
could solve your immediate problem. Though try Fb 1.5 as Carlos
recommended you to see if that makes a difference.
Set
--- In firebird-support@yahoogroups.com, Bradley Tate wrote:
> Hi
>
> I am starting think the firebird optimizer has some real problems
> with left outer joins or there is something I don't understand about
> indexes. As soon as you seem to use a left outer join it seems to
> think it needs to do a table scan. If you run the sql below it does
> a table scan of the phone table. With a inner join instead of the
> outer it works correctly.