On Fri, 2007-04-06 at 12:47 +0200, Zeugswetter Andreas ADI SD wrote:
> What I think we would like to have is putting the append nodes into an
> order that allows removing the sort node whenever that can be done.
> And
> maybe a merge node (that replaces the append and sort node) that can
> merge presorted partitions. 

Yes, we definitely need a way to express the ordering of partitions. We
can use this in the way that you say, as well as being able to do faster
inclusion/exclusion:

i.e. if we have partitions for each year (2001, 2002, 2003 2004, 2005,
2006, 2007) AND we have already proved that 2005 is excluded when we
have a WHERE clause saying year >= 2006, then we should be able to use
the ordering to prove that partitions for 2004 and before are also
automatically excluded.

I'll think some more about the Merge node, but not right now.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com



---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

Reply via email to