Re: small temp files

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема Re: small temp files
Дата
Msg-id 16C7116A-2CB2-4909-8830-2FA16470EE27@elevated-dev.com
обсуждение исходный текст
Ответ на Re: small temp files  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-admin
> On Jul 22, 2024, at 8:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> You would get more specific answers if you provided an example of the
> queries that cause this, with EXPLAIN ANALYZE output.  But I think a
> likely bet is that it's doing a hash join that overruns work_mem.
> What will happen is that the join gets divided into batches based on
> hash codes, and each batch gets dumped into its own temp files (one
> per batch for each side of the join).  It would not be too surprising
> if some of the batches are small, thanks to the vagaries of hash
> values.  Certainly they could be less than work_mem, since the only
> thing we can say for sure is that the sum of the temp file sizes for
> the inner side of the join should exceed work_mem.

OK, that makes total sense, and fits our usage patterns. (Lots of complex queries, lots of hash joins.)

thanks




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