pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: MichaelDBA <MichaelDBA@sqlexec.com>
To: Fabio Pardi <f.pardi@portavita.eu>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: parallel index creation: maintenance_work_mem not honored?
Date: Sat, 25 Jun 2022 12:37:14 -0400
Message-ID: <1fc5a193-497c-7ec4-57f0-014b1833bf9d@sqlexec.com> (raw)
In-Reply-To: <f815f4b2-d49f-434b-b3de-d204605de49f@portavita.eu>
References: <13fa6c59-16bc-9945-f913-2e0c58d34d12@portavita.eu>
	<CAH2-Wz=s47yo-gi5tdE1xneEB9nkBU4stzJMMiJ-Ny5qibkfzg@mail.gmail.com>
	<7441b023-5b3f-6646-0261-c53556f91b3a@portavita.eu>
	<CAH2-Wz=M8oic5i8++jp+_94qes51sv8BgmmsW9uRANw+1oP_eg@mail.gmail.com>
	<f815f4b2-d49f-434b-b3de-d204605de49f@portavita.eu>

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@sqlexec.com <mailto:michaelvitale@sqlexec.com>

703-600-9343

Attachments:

pgadvanced3.jpg (image/jpeg, 20.6K) download view image

view thread (7+ messages)  latest in thread

Message-ID: <1fc5a193-497c-7ec4-57f0-014b1833bf9d@sqlexec.com>
Permalink:  ../1fc5a193-497c-7ec4-57f0-014b1833bf9d@sqlexec.com/
Also on:    postgresql.org/message-id/1fc5a193-497c-7ec4-57f0-014b1833bf9d@sqlexec.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: MichaelDBA@sqlexec.com, f.pardi@portavita.eu, pg@bowt.ie, pgsql-admin@lists.postgresql.org
  Subject: Re: parallel index creation: maintenance_work_mem not honored?
  In-Reply-To: <1fc5a193-497c-7ec4-57f0-014b1833bf9d@sqlexec.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox