From: | MichaelDBA <MichaelDBA(at)sqlexec(dot)com> |
---|---|
To: | Fabio Pardi <f(dot)pardi(at)portavita(dot)eu> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: parallel index creation: maintenance_work_mem not honored? |
Date: | 2022-06-25 16:37:14 |
Message-ID: | 1fc5a193-497c-7ec4-57f0-014b1833bf9d@sqlexec.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi all,
Not quite following this line of logic... If "External sorts are often
faster than internal sorts", why bother with increasing work_mem to
avoid sorting on disk?
Regards,
Michael Vitale
Fabio Pardi wrote on 6/22/2022 2:15 AM:
> Thanks for the clarification Peter,
>
> On 21/06/2022 08:46, Peter Geoghegan wrote:
>>
>>> But why the temp files are always on disk and not in RAM as other
>>> operations do?
>> Why not?
>
> Systems running on slow disks will probably suffer from workers
> writing temp files to disk.
>
>> It is probably true that it would be better to use shared memory in
>> the case where there is sufficient memory, but it's not all that
>> significant compared to everything else that must happen at the same
>> time. It's rarely the bottleneck. External sorts are often faster than
>> internal sorts. That happens because they can be more CPU cache
>> friendly, for reasons that aren't fundamental.
>>
>
>
> I would expect this behavior to be mentioned in the documentation.
>
>
>
>
> regards,
>
> fabio pardi
>
>
Regards,
Michael Vitale
Michaeldba(at)sqlexec(dot)com <mailto:michaelvitale(at)sqlexec(dot)com>
703-600-9343
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2022-06-25 17:17:03 | Re: parallel index creation: maintenance_work_mem not honored? |
Previous Message | Balamurugan Thanikachalam | 2022-06-25 02:31:05 | Re: Postgres performance issue |