Re: OLAP CUBE/ROLLUP Operators and GROUP BY grouping sets

Поиск
Список
Период
Сортировка
От Robert Bedell
Тема Re: OLAP CUBE/ROLLUP Operators and GROUP BY grouping sets
Дата
Msg-id 200312171926323.SM00984@xavier
обсуждение исходный текст
Ответ на Re: OLAP CUBE/ROLLUP Operators and GROUP BY grouping sets  ("Robert Bedell" <robert@friendlygenius.com>)
Список pgsql-hackers
> > For pure ROLLUP one could shortcut the split-into-groups and
> > put-together-again process, as ROLLUP is already doable from single
> > sorted scan.
> 
> Actually as long as the grouping sets are all left-continuous of the
> longest
> grouping set it's doable from a single sorted scan.  If done with the
> right
> implementation separating resetable aggregators and out of order
> aggregators
> you could get this optimization for free.  This avoids having to look for
> ROLLUP specifically.

Ok, putting it that way was kind of dumb - and you already said that mostly.
What I mean to say is you don't have to check for ROLLUP specifically to get
that optimization..  This also allows you to do "GROUP BY a, b, ROLLUP(c,d)"
(resulting in grouping sets {{a,b,c,d},{a,b,c},{a,b}}) in an optimized
fashion without having to check for PURE rollup.

Cheers,

Robert



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

Предыдущее
От: "Robert Bedell"
Дата:
Сообщение: Re: OLAP CUBE/ROLLUP Operators and GROUP BY grouping sets
Следующее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: TODO list