pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: pgsql-hackers mailing list <pgsql-hackers@postgresql.org>
Subject: Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com
Date: Mon, 27 Nov 2017 18:56:31 +0100
Message-ID: <20171127175631.GA405@depesz.com> (raw)
In-Reply-To: <CAA4eK1K=VBrwr4496_TvKHhL2wZ5UQWY2W-9ZgSgQCJ8nG77DA@mail.gmail.com>
References: <20171124112151.GA6616@depesz.com>
	<CAA4eK1JwC4n1XyXnvk=vC0WkAFAM0T++xuNr79c+jX3eVTrOwQ@mail.gmail.com>
	<20171127091508.GA2525@depesz.com>
	<CAA4eK1K=VBrwr4496_TvKHhL2wZ5UQWY2W-9ZgSgQCJ8nG77DA@mail.gmail.com>

On Mon, Nov 27, 2017 at 05:24:49PM +0530, Amit Kapila wrote:
> I think it is "actual_time * 1" for anything below Gather.

Well, I think I found another problem.

Please take a look at:
https://explain.depesz.com/s/Bs8c

Node 15 is Gather with loops = 2974 (because it was ran by nested loop).

There were 4 workers, so 5 threads working, but the loops on parallel
seq scan is 17.698 million ?!

The problem is that for explain.depesz.com I'm calculating how much time
pg actually spent doing given thing.

So, if an operation has actual time of 1ms, but 100 loops, it took
100ms.

In case of parallel operations it looks like I can't realistically find
the information anywhere?

In the explain above, we see that Nested loop took, in total, around
2 million miliseconds (step 9).
Out of which, ~ 7000 ms was hash join and it's subnodes.
This leaves most of the time for Gather step, which was called 2974
times with actual time reported as 618ms.
2974 * 618 is 1837932 miliseconds, which seems reasonable.

But then - how much of this time was spent in Parallel Seq Scan in step
#16 ?

2974 * 609ms? Why is loops there 17 million?

Best regards,

depesz





view thread (43+ messages)  latest in thread

Message-ID: <20171127175631.GA405@depesz.com>
Permalink:  ../20171127175631.GA405@depesz.com/
Also on:    postgresql.org/message-id/20171127175631.GA405@depesz.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-hackers@postgresql.org
  Cc: depesz@depesz.com, amit.kapila16@gmail.com
  Subject: Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com
  In-Reply-To: <20171127175631.GA405@depesz.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