Subject | [firebird-support] Re: FB does table scan as soon as I use left outer join in view - why? |
---|---|
Author | setysvar |
Post date | 2015-08-21T21:05:34Z |
>Something like:I guess that means that
>
>select S.*
>from COLLECTION_ COLL
>left join SKIN S on S.ID = COLL.SKIN_ID
>where S.ID is not null
>
>i.e. fake the left join to get the correct join order
>(COLLECTION_->SKIN_->COLOUR_).
select S.*
from COLLECTION_ COLL
join SKIN S on S.ID = COLL.SKIN_ID+0
often will be an alternative? I.e. put the view containing the LEFT JOIN
at the bottom of your query and make sure that no index can be used for
the other side of the JOIN? Though if your query contains two or more
such VIEWs, I guess there's no remedy short of sponsoring Firebird and
wait a couple of years.
Set