Re: Union strange explain
От | Stephan Szabo |
---|---|
Тема | Re: Union strange explain |
Дата | |
Msg-id | 20020705091034.W27508-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Re: Union strange explain ("Gaetano Mendola" <mendola@bigfoot.com>) |
Список | pgsql-admin |
On Fri, 5 Jul 2002, Gaetano Mendola wrote: > Stephan wrote: > > number of rows returned). I think there was some question about > > whether it was safe to do that optimization (ie, > > is select * from (a union [all] b) where condition > > always the same as > > select * from a where condition union [all] > > select * from b where condition > > ) > > Yes but with a View the condition is always extern. > I'm understanding that I don't have any possibility to > optimize that view, I'm wrong ? Right now, I don't think there's much you can do using a view. Until we at least think we know what the safe conditions are to make that optimization, we can't do so since we might return incorrect results if the optimization is performed in a place it doesn't apply. If you want to do the legwork to show what (if any conditions) need to be met to do the optimization, we'd certainly be happy. :)
В списке pgsql-admin по дате отправления: