Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE . - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .
Date
Msg-id CAA4eK1LbK__2QT=8jEtdhLKkkdeLybw+T4KiZB5WXQKwB30J+Q@mail.gmail.com
Whole thread Raw
In response to Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
On Mon, Jun 20, 2016 at 12:24 PM, Masahiko Sawada <sawada.mshk@gmail.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.

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .
Next
From: Amit Kapila
Date:
Subject: Re: Actuall row count of Parallel Seq Scan in EXPLAIN ANALYZE .