Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .
Date: 2016-06-20 07:29:45
Message-ID: CAA4eK1LbK__2QT=8jEtdhLKkkdeLybw+T4KiZB5WXQKwB30J+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 20, 2016 at 12:24 PM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
wrote:
>
>
> In following case, it look to me that no one collect the tuple.
> But it's obviously incorrect, this query collects a tuple(aid = 10)
actually.
>
> postgres(1)=# explain analyze verbose select * from pgbench_accounts
> where aid = 10;
> QUERY
PLAN
>
--------------------------------------------------------------------------------------------------------------------------------------------
> Gather (cost=1000.00..217018.43 rows=1 width=97) (actual
> time=0.541..2094.773 rows=1 loops=1)
> Output: aid, bid, abalance, filler
> Workers Planned: 2
> Workers Launched: 2
> -> Parallel Seq Scan on public.pgbench_accounts
> (cost=0.00..216018.34 rows=0 width=97) (actual time=1390.109..2088.103
> rows=0 loops=3)
> Output: aid, bid, abalance, filler
> Filter: (pgbench_accounts.aid = 10)
> Rows Removed by Filter: 3333333
> Worker 0: actual time=2082.681..2082.681 rows=0 loops=1
> Worker 1: actual time=2087.532..2087.532 rows=0 loops=1
> Planning time: 0.126 ms
> Execution time: 2095.564 ms
> (12 rows)
>
> How can we consider actual rows and nloops?
>

Here rows is an average value per-execution. In some cases, you might not
get the exact number. You might find the information in docs [1] useful.
Refer Explain Analyze section.

[1] - https://www.postgresql.org/docs/9.6/static/using-explain.html

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-06-20 07:32:29 Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .
Previous Message Amit Langote 2016-06-20 07:17:20 Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .