Re: Temporary files usage in explain

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Matteo Bonardi <mbona92(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Temporary files usage in explain
Date: 2021-04-27 09:38:17
Message-ID: CAApHDvqh33cFnVzR-JWGEbSBQfuOR3_2LbGyD6mTr_+AzHnVyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 27 Apr 2021 at 21:15, Matteo Bonardi <mbona92(at)gmail(dot)com> wrote:
> 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?

If you do EXPLAIN (ANALYZE, BUFFERS) you might find that the recursive
CTE is writing the rest of them out. Something like "temp written =
", likely around 5 million or so, I imagine.

David

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matteo Bonardi 2021-04-27 09:57:01 Re: Temporary files usage in explain
Previous Message Laurenz Albe 2021-04-27 09:30:36 Re: Temporary files usage in explain