would it be a lot of work, to add optimizations accross unions ?

Поиск
Список
Период
Сортировка
От Grzegorz Jaskiewicz
Тема would it be a lot of work, to add optimizations accross unions ?
Дата
Msg-id 30B877B6-63D3-4B49-9337-3AA469A78D42@pointblue.com.pl
обсуждение исходный текст
Ответы Re: would it be a lot of work, to add optimizations accross unions ?  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Say I have:

select foo ( select foo from bar1  union all select foo from bar2  union all select foo from bar3  ...
) a order by foo desc limit X;


(and I can give you few other examples around the same 'note', say  
with when foo=N in outer subselect)

Would anyone consider such optimization, when postgres will apply the  
same condition to inner queries, providing that their size is  
substantial?

Same would actually apply for different subqueries, without union/ 
intersect/etc:

select foo( select foo from bar1 ) a where foo in (x,y,z) order by foo  
desc limit N

(of course this is just a simplified example).





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: add_path optimization
Следующее
От: James Pye
Дата:
Сообщение: Re: xpath processing brain dead