From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Han Zhou <zhouhan(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Fwd: [HACKERS] client performance v.s. server statistics |
Date: | 2012-02-15 11:36:01 |
Message-ID: | 201202151236.01839.andres@anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
On Wednesday, February 15, 2012 12:33:13 PM Han Zhou wrote:
> Hi,
>
> To be more specific, I list my calculation here:
> The timing shown in psql may include: plan + execution + copying to
> result set in backend (does this step exist?) + transferring data to
> client via socket.
Correct.
> Then I want to know what's the time shown in pg_stat_statement and
> EXPLAIN ANALYZE in terms of the above mentioned parts. And why are the
> gap is almost 10 times (100 ms v.s. 1 second)? As a comparison,
> transferring same amount of data with unix domain socket should cost
> only a very small fraction of this (almost negligible), according to
> my other performance tests.
Yea, you proved my quick theory wrong.
> And I don't think the plan time plays an important role here in
> EXPLAIN ANALYZE, because the command itself costs similar time to the
> "Total runtime" as shown in psql (timing on), which means the plan is
> too simple to take any significant part of time in this case.
Sounds like that.
It would be interesting to see the time difference between:
COPY (SELECT * FROM blub) TO '/tmp/somefile';
COPY (SELECT * FROM blub) TO '/tmp/somefile' BINARY;
EXPLAIN ANALYZE SELECT * FROM blub;
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2012-02-15 11:50:16 | Re: pgsql_fdw, FDW for PostgreSQL server |
Previous Message | Han Zhou | 2012-02-15 11:33:13 | Re: Fwd: [HACKERS] client performance v.s. server statistics |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-02-15 15:24:27 | Re: client performance v.s. server statistics |
Previous Message | Han Zhou | 2012-02-15 11:33:13 | Re: Fwd: [HACKERS] client performance v.s. server statistics |