Subject | Re: [firebird-support] Optimal plans using views |
---|---|
Author | Milan Babuskov |
Post date | 2008-06-12T10:33:20Z |
kokok_kokok wrote:
clause, but not with JOIN. I usually work around this by rewritting the
query to use CTE or a subselect so it uses WHERE directly against the view.
--
Milan Babuskov
http://www.flamerobin.org
> I have found that FB 2.0 does not get a good plan when I use someIf you have views (esp. with unions) they would use the index with WHERE
> views. It does not use index in some scenarios, just natural queries.
>
> Then, if I rewrite the SQL using the underlying view sql statement, FB
> get the optimal plan. It seems than the View "hides" the index in some
> scenarios.
>
> Does somebody have a similar problem?
clause, but not with JOIN. I usually work around this by rewritting the
query to use CTE or a subselect so it uses WHERE directly against the view.
--
Milan Babuskov
http://www.flamerobin.org