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 10:15:08 +0100
Message-ID: <20171127091508.GA2525@depesz.com> (raw)
In-Reply-To: <CAA4eK1JwC4n1XyXnvk=vC0WkAFAM0T++xuNr79c+jX3eVTrOwQ@mail.gmail.com>
References: <20171124112151.GA6616@depesz.com>
	<CAA4eK1JwC4n1XyXnvk=vC0WkAFAM0T++xuNr79c+jX3eVTrOwQ@mail.gmail.com>

On Sat, Nov 25, 2017 at 07:08:03AM +0530, Amit Kapila wrote:
> > For example, check step 13 in https://explain.depesz.com/s/gNBd
> >
> > It shows time of 3ms, but loops of 1873, so the actual time is ~ 5600ms.
> >
> > But with parallel execution it seems to be no longer the case.
> >
> > For example:
> > https://explain.depesz.com/s/LTMp
> > or
> > https://explain.depesz.com/s/QHRi
> > Should I, for explain.depesz.com, when dealing
> > with partial* and parallel* nodes, use "loops=1" for calculation of
> > exclusive/inclusive time? always? some other nodes?
> >
> 
> I am not sure what exactly inclusive or exclusive means, but for
> parallel nodes, total stats are accumulated so you are seeing loops as
> 'worker nodes + 1'.  Now, as presumably workers run parallelly, so I
> think the actual time will be what will be shown in the node not
> actual time * nloops.

Please check the plans:
https://explain.depesz.com/s/gNBd (step 13)
and https://explain.depesz.com/s/LTMp (step 3)

Inclusive time is basically "loops * actual time", so for Index Scan,
which had 1873 loops and actual time of 3.002..3.016, we got 1873
* 3.016 = 5648.968ms.

In case of parallel workers it looks like the inclusive time is
basically the upper value from actual time.

The question now is: how can I tell which nodes should use "actual_time
* 1" and which "actual_time * loops" time?

Anything "below" "Gather"?
Anything starting with "Partial?"
Anything starting with "Parallel"?
Anything with "Worker" in node "description" in explain?

depesz




view thread (43+ messages)  latest in thread

Message-ID: <20171127091508.GA2525@depesz.com>
Permalink:  ../20171127091508.GA2525@depesz.com/
Also on:    postgresql.org/message-id/20171127091508.GA2525@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: <20171127091508.GA2525@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