Skip site navigation (1) Skip section navigation (2)

Re: Fwd: [HACKERS] client performance v.s. server statistics

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

In response to

Responses

pgsql-performance by date

Next:From: Amit KapilaDate: 2012-02-15 15:24:27
Subject: Re: client performance v.s. server statistics
Previous:From: Han ZhouDate: 2012-02-15 11:33:13
Subject: Re: Fwd: [HACKERS] client performance v.s. server statistics

pgsql-hackers by date

Next:From: Etsuro FujitaDate: 2012-02-15 11:50:16
Subject: Re: pgsql_fdw, FDW for PostgreSQL server
Previous:From: Han ZhouDate: 2012-02-15 11:33:13
Subject: Re: Fwd: [HACKERS] client performance v.s. server statistics

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group