On Fri, 19 Jan 2007, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > What we want to do is have a kind of 'sub plan' for each aggregate. In > > effect, the plan might start looking like a directed graph. Here is part > > of the plan as a directed graph. > > > GroupAggregate > > /-----------------^---------------... > > | | > > | | > > ^ | > > | Unique > > | ^ > > | | > > Sort Sort > > (saledate) (saledate,prodid) > > ^ ^ > > | | > > -------------- Fan Out ------------... > > ^ > > | > > Scan > > > This idea was presented by Brian Hagenbuch at Greenplum. He calls it a > > 'Fan Out' plan. It is trivial to rejoin the data because all data input to > > the aggregates is sorted by the same primary key. > > Er, what primary key would that be exactly? And even if you had a key, > I wouldn't call joining on it trivial; I'd call it expensive ...
I should have used slightly different language. What I meant to say was, both sets are primarily sorted by saledate so they can be merged back together. This is why I said it was trivial. Thanks, Gavin ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly