Subject: Re: explain

From: David Rowley <[email-masked]>
Date: Fri, 25 Apr 2025 01:41:34 +1200

On Fri, 25 Apr 2025 at 01:32, Marc Millas <[email-masked]> wrote:
> Nested Loop Left Join  (cost=941400.77..966327.57 rows=3 width=653) (actual time=52655.694..62533.811 rows=346 loops=1)
>   Buffers: shared hit=10068265 read=396705 dirtied=1858 written=218, temp read=429687 written=115187
>   I/O Timings: read=79368.246 write=11.486
>
> So, the total execution time is 52655 ms ok
> and the total time for i/o is...79368 ms
>
> how ???

The 79.3 seconds is the total time spent doing reads for all parallel
workers. 52.6 seconds is the wall clock time elapsed to execute the
query.

David

---

From: Marc Millas <[email-masked]>
Date: Thu, 24 Apr 2025 15:51:01 +0200

Thanks !

Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com

On Thu, Apr 24, 2025 at 3:41 PM David Rowley <[email-masked]> wrote:

> > Nested Loop Left Join  (cost=941400.77..966327.57 rows=3 width=653)
> (actual time=52655.694..62533.811 rows=346 loops=1)

---

From: Laurenz Albe <[email-masked]>
Date: Thu, 24 Apr 2025 17:06:52 +0200

> workers. 52.6 seconds is the wall clock time elapsed to execute the

But wouldn't it read "loops=3" or similar then?

Yours,
Laurenz Albe

---

From: David Rowley <[email-masked]>
Date: Fri, 25 Apr 2025 12:36:11 +1200

> But wouldn't it read "loops=3" or similar then?

Only if the Nested Loop was below the Gather / Gather Merge node.

David

---

From: Laurenz Albe <[email-masked]>
Date: Fri, 25 Apr 2025 08:02:02 +0200

> Only if the Nested Loop was below the Gather / Gather Merge node.

Ah, I see.  The I/O time accrued in a different, lower, parallelized step
of the execution plan.

Yours,
Laurenz Albe