Subject | Re: FB does table scan as soon as I use left outer join in view - why? |
---|---|
Author | Dmitry Yemanov |
Post date | 2015-08-20T21:03:30Z |
20.08.2015 16:53, 'Louis van Alphen' wrote:
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_).
Dmitry
> The same thing happens in many other queries where I use views and IMHOTrue, when views contain outer joins.
> I find it non-sensical. I have come to the conclusion that FB does not
> choose great query plans when using views.
> It is really hard to tune queries if the results _/seem/_ unpredictablePlan shows how the query is being executed.
> and there are no visibilty in how FB executes the query.
> Help would be appreciatedSomething like:
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_).
Dmitry