Re: Slow query with a lot of data

Поиск
Список
Период
Сортировка
От Moritz Onken
Тема Re: Slow query with a lot of data
Дата
Msg-id 07C8F893-C524-44CD-831D-EA1240C429AA@houseofdesign.de
обсуждение исходный текст
Ответ на Re: Slow query with a lot of data  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Slow query with a lot of data  (Moritz Onken <onken@houseofdesign.de>)
Список pgsql-performance
Am 20.08.2008 um 20:28 schrieb Tom Lane:

> "Scott Carey" <scott@richrelevance.com> writes:
>> The planner actually thinks there will only be 28704 rows returned
>> of width
>> 12.  But it chooses to sort 53 million rows before aggregating.
>> Thats
>> either a bug or there's something else wrong here.   That is the
>> wrong way
>> to aggregate those results no matter how much work_mem you have
>> unless I'm
>> completely missing something...
>
> That does look weird.  What are the datatypes of the columns being
> grouped by?  Maybe they're not hashable?
>
> Another forcing function that prevents use of HashAgg is DISTINCT
> aggregates, but you don't seem to have any in this query...
>
>             regards, tom lane

The datatypes are both integers. There is no DISTINCT in this query.
Thanks anyway!



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

Предыдущее
От: Moritz Onken
Дата:
Сообщение: Re: Slow query with a lot of data
Следующее
От: Moritz Onken
Дата:
Сообщение: Re: Slow query with a lot of data