Re: possible minor EXPLAIN bug?

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: possible minor EXPLAIN bug?
Дата
Msg-id 1219137095.5343.952.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на possible minor EXPLAIN bug?  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Ответы Re: possible minor EXPLAIN bug?
Список pgsql-hackers
On Tue, 2008-08-19 at 09:45 +0200, Pavel Stehule wrote:

> postgres=# explain select sum(a) from twocol group by b;
>                            QUERY PLAN
> ----------------------------------------------------------------
>  HashAggregate  (cost=42.10..44.60 rows=200 width=8) --< wrong should be 4
>    ->  Seq Scan on twocol  (cost=0.00..31.40 rows=2140 width=8)
> (2 rows)

Although column b is not displayed it is kept in the HashAgg node to
allow your request to GROUP BY B. I'm happy that it tells me the width
of 8 so I can work out space used by hash, but perhaps it should say 12
(or even 16) to include hash value also, so we include the full cost per
row in the hash table.

If you do  explain select sum(a) from twocol
you will see the width is only 4

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Compatibility types, type aliases, and distinct types
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Extending varlena