Re: Back-patch change in hashed DISTINCT estimation?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Back-patch change in hashed DISTINCT estimation?
Дата
Msg-id 20130821110526.GB5185@awork2.anarazel.de
обсуждение исходный текст
Ответ на Back-patch change in hashed DISTINCT estimation?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Back-patch change in hashed DISTINCT estimation?  (Stephen Frost <sfrost@snowman.net>)
Re: Back-patch change in hashed DISTINCT estimation?  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
On 2013-08-20 17:24:18 -0400, Tom Lane wrote:
> In a thread over in pgsql-performance, Tomas Vondra pointed out that
> choose_hashed_distinct was sometimes making different choices than
> choose_hashed_grouping, so that queries like these:
> 
>     select distinct x from ... ;
>     select x from ... group by 1;
> 
> might get different plans even though they should be equivalent.
> After some debugging it turns out that I omitted hash_agg_entry_size()
> from the hash table size estimate in choose_hashed_distinct --- I'm pretty
> sure I momentarily thought that this function must yield zero if there are
> no aggregates, but that's wrong.  So we need a patch like this:

> What I'm wondering is whether to back-patch this or leave well enough
> alone.  The risk of back-patching is that it might destabilize plan
> choices that people like. [...]

> A possible compromise is to back-patch into 9.3 (where the argument about
> destabilizing plan choices doesn't have much force yet), but not further.

+1 for 9.3 only.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: "ciifrancesco@tiscali.it"
Дата:
Сообщение: R: [pgsql-zh-general] (solved - 谢谢) Chinese in Postgres
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] BUG #8335: trim() un-document behaviour