Re: Questions on query planner, join types, and work_mem

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Questions on query planner, join types, and work_mem
Дата
Msg-id 1280289550-sup-6155@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Questions on query planner, join types, and work_mem  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Questions on query planner, join types, and work_mem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Excerpts from Tom Lane's message of mar jul 27 20:05:02 -0400 2010:
> Peter Hussey <peter@labkey.com> writes:

> > 2) How is work_mem used by a query execution?
>
> Well, the issue you're hitting is that the executor is dividing the
> query into batches to keep the size of the in-memory hash table below
> work_mem.  The planner should expect that and estimate the cost of
> the hash technique appropriately, but seemingly it's failing to do so.
> Since you didn't provide EXPLAIN ANALYZE output, though, it's hard
> to be sure.

Hmm, I wasn't aware that hash joins worked this way wrt work_mem.  Is
this visible in the explain output?  If it's something subtle (like an
increased total cost), may I suggest that it'd be a good idea to make it
explicit somehow in the machine-readable outputs?

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Pooling in Core WAS: Need help in performance tuning.
Следующее
От: Jayadevan M
Дата:
Сообщение: Re: Questions on query planner, join types, and work_mem