Re: asynchronous execution - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: asynchronous execution
Date
Msg-id 20161025.192252.214527571.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: asynchronous execution  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: asynchronous execution  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Hi, this is the 7th patch to make instrumentation work.

Explain analyze shows the following result by the previous patch set .

| Aggregate  (cost=820.25..820.26 rows=1 width=8) (actual time=4324.676..4324.676
| rows=1 loops=1)
|   ->  Append  (cost=0.00..791.00 rows=11701 width=4) (actual time=0.910..3663.8
|82 rows=4000000 loops=1)
|     ->  Foreign Scan on ft10  (cost=100.00..197.75 rows=2925 width=4)
|                               (never executed)
|     ->  Foreign Scan on ft20  (cost=100.00..197.75 rows=2925 width=4)
|                               (never executed)
|     ->  Foreign Scan on ft30  (cost=100.00..197.75 rows=2925 width=4)
|                               (never executed)
|     ->  Foreign Scan on ft40  (cost=100.00..197.75 rows=2925 width=4)
|                               (never executed)
|     ->  Seq Scan on pf0  (cost=0.00..0.00 rows=1 width=4)
|                          (actual time=0.004..0.004 rows=0 loops=1)

The current instrument stuff assumes that requested tuple always
returns a tuple or the end of tuple comes. This async framework
has two point of executing underneath nodes. ExecAsyncRequest and
ExecAsyncEventLoop. So I'm not sure if this is appropriate but
anyway it seems to show sane numbers.

| Aggregate  (cost=820.25..820.26 rows=1 width=8) (actual time=4571.205..4571.206
| rows=1 loops=1)
|   ->  Append  (cost=0.00..791.00 rows=11701 width=4) (actual time=1.362..3893.1
|14 rows=4000000 loops=1)
|     ->  Foreign Scan on ft10  (cost=100.00..197.75 rows=2925 width=4)
|                        (actual time=1.056..770.863 rows=1000000 loops=1)
|     ->  Foreign Scan on ft20  (cost=100.00..197.75 rows=2925 width=4)
|                        (actual time=0.461..767.840 rows=1000000 loops=1)
|     ->  Foreign Scan on ft30  (cost=100.00..197.75 rows=2925 width=4)
|                        (actual time=0.474..782.547 rows=1000000 loops=1)
|     ->  Foreign Scan on ft40  (cost=100.00..197.75 rows=2925 width=4)
|                        (actual time=0.156..765.920 rows=1000000 loops=1)
|     ->  Seq Scan on pf0  (cost=0.00..0.00 rows=1 width=4) (never executed)


regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pg_basebackup stream xlog to tar
Next
From: Amit Kapila
Date:
Subject: Re: Declarative partitioning - another take