Re: parallel query evaluation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: parallel query evaluation
Дата
Msg-id 9130.1352561545@sss.pgh.pa.us
обсуждение исходный текст
Ответ на parallel query evaluation  (Oliver Seidel <postgresql@os10000.net>)
Список pgsql-performance
Oliver Seidel <postgresql@os10000.net> writes:
> I have
>              create table x ( att bigint, val bigint, hash varchar(30)
> );
> with 693million rows.  The query

>              create table y as select att, val, count(*) as cnt from x
> group by att, val;

> ran for more than 2000 minutes and used 14g memory on an 8g physical
> RAM machine

What was the plan for that query?  What did you have work_mem set to?

I can believe such a thing overrunning memory if the planner chose to
use a hash-aggregation plan instead of sort-and-unique, but it would
only do that if it had made a drastic underestimate of the number of
groups implied by the GROUP BY clause.  Do you have up-to-date
statistics for the source table?

            regards, tom lane


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

Предыдущее
От: Petr Praus
Дата:
Сообщение: Re: Re: Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
Следующее
От: Rafał Rzepecki
Дата:
Сообщение: Planner sometimes doesn't use a relevant index with IN (subquery) condition