Skip site navigation (1) Skip section navigation (2)

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

From: Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: would it be a lot of work, to add optimizations accross unions ?
Date: 2009-02-28 10:44:32
Message-ID: 30B877B6-63D3-4B49-9337-3AA469A78D42@pointblue.com.pl (view raw or flat)
Thread:
Lists: 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).




Responses

pgsql-hackers by date

Next:From: James PyeDate: 2009-02-28 10:51:27
Subject: Re: xpath processing brain dead
Previous:From: Tom LaneDate: 2009-02-28 04:06:11
Subject: Re: add_path optimization

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group