Re: GROUPING SETS revisited

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: GROUPING SETS revisited
Дата
Msg-id AANLkTimKAmhhULrHXHb87UEnadpn=Wz59__CLVzYWtCe@mail.gmail.com
обсуждение исходный текст
Ответ на Re: GROUPING SETS revisited  (Joshua Tolley <eggyknap@gmail.com>)
Список pgsql-hackers
I found other issue :(

postgres=#  select name, place from cars group by grouping sets(name, place,());name  |   place
-------+------------bmw   |skoda |opel  |      | germany      | czech rep.skoda | czech rep.skoda | germanybmw   |
czechrep.bmw   | germanyopel  | czech rep.opel  | germany
 
(11 rows)

postgres=# explain select name, place from cars group by grouping
sets(name, place,());                                 QUERY PLAN
------------------------------------------------------------------------------Append  (cost=36.98..88.55 rows=1230
width=54) CTE GroupingSets    ->  Seq Scan on cars  (cost=0.00..18.30 rows=830 width=68)  ->  HashAggregate
(cost=18.68..20.68rows=200 width=32)        ->  CTE Scan on "GroupingSets"  (cost=0.00..16.60 rows=830 width=32)  ->
HashAggregate (cost=18.68..20.68 rows=200 width=32)        ->  CTE Scan on "GroupingSets"  (cost=0.00..16.60 rows=830
width=32) ->  CTE Scan on "GroupingSets"  (cost=0.00..16.60 rows=830 width=64)
 
(8 rows)

the combination of nonagregates and empty sets do a problems - because
we can't ensure agg mode without aggregates or group by. But it is
only minor issue

2010/8/5 Joshua Tolley <eggyknap@gmail.com>:
> On Thu, Aug 05, 2010 at 04:46:51PM +0200, Pavel Stehule wrote:
>> So Joshua, can you look on code?
>
> Sure... thanks :)
>
> --
> Joshua Tolley / eggyknap
> End Point Corporation
> http://www.endpoint.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkxa1NsACgkQRiRfCGf1UMPwzQCgjz52P86Yx4ac4aRkKwjn8OHK
> 6/EAoJ/CjXEyPaLpx39SI5bKQPz+AwBR
> =Mi2J
> -----END PGP SIGNATURE-----
>
>


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Online backup cause boot failure, anyone know why?
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: MERGE Specification