pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Matteo Bonardi <mbona92@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Temporary files usage in explain
Date: Tue, 27 Apr 2021 11:30:36 +0200
Message-ID: <93c44e419911beb7ba28ab5f75f2fc113273e643.camel@cybertec.at> (raw)
In-Reply-To: <CAPosY76DbSZxwszm2TJJ-A=vhunb_6Gf7k8B31T0uOQgeyb9wg@mail.gmail.com>
References: <CAPosY76DbSZxwszm2TJJ-A=vhunb_6Gf7k8B31T0uOQgeyb9wg@mail.gmail.com>

On Tue, 2021-04-27 at 11:15 +0200, Matteo Bonardi wrote:
> I have a query that creates a large number of temporary files, in this example ~ 45GB.
> Looking at the query plan I can't figure out where temporary files are being generated.
> 
> Explain plan: https://explain.depesz.com/s/BXGT
> 
> Usually I'm looking for "external merge Disk" to see temp files usage but, in this case, the only reference to that is 299,368kB in the last but one node of explain.
> Can anyone help me understand where the 45GB are in that explain?

I see at first glance: Sort Method: external merge Disk: 299,368kB

To see all, use EXPLAIN (ANALYZE, BUFFERS).

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (4+ messages)  latest in thread

Message-ID: <93c44e419911beb7ba28ab5f75f2fc113273e643.camel@cybertec.at>
Permalink:  ../93c44e419911beb7ba28ab5f75f2fc113273e643.camel@cybertec.at/
Also on:    postgresql.org/message-id/93c44e419911beb7ba28ab5f75f2fc113273e643.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, mbona92@gmail.com
  Subject: Re: Temporary files usage in explain
  In-Reply-To: <93c44e419911beb7ba28ab5f75f2fc113273e643.camel@cybertec.at>
  References: <CAPosY76DbSZxwszm2TJJ-A=vhunb_6Gf7k8B31T0uOQgeyb9wg@mail.gmail.com> <93c44e419911beb7ba28ab5f75f2fc113273e643.camel@cybertec.at>

* 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