Re: Performance issue: index not used on GROUP BY...

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Performance issue: index not used on GROUP BY...
Дата
Msg-id 53FF9585.2020503@agliodbs.com
обсуждение исходный текст
Ответ на Performance issue: index not used on GROUP BY...  (gmb <gmbouwer@gmail.com>)
Ответы Re: Performance issue: index not used on GROUP BY...  (gmb <gmbouwer@gmail.com>)
Список pgsql-performance
On 08/28/2014 01:50 AM, gmb wrote:
> Can somebody please confirm whether aggregate functions such as GROUP BY
> should use indexes ?

Sometimes.  In your case, the index has one more column than the GROUP
BY, which makes it less likely that Postgres will use it (since
depending on the cardinality of ddet_id, it might actually be slower to
use the index).

In addition, other folks on this thread have already pointed out the
memory settings issues to you.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


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

Предыдущее
От: Emi Lu
Дата:
Сообщение: Re: autocommit (true/false) for more than 1 million records
Следующее
От: "Burgess, Freddie"
Дата:
Сообщение: Very slow running query PostgreSQL 9.3.4