From: Andres Freund <andres@anarazel.de>
To: pgsql-performance@postgresql.org
Cc: Zhou Han <zhouhan@gmail.com>
Subject: Re: Fwd: [HACKERS] client performance v.s. server statistics
Date: Wed, 15 Feb 2012 11:55:19 +0100
Message-ID: <201202151155.19449.andres@anarazel.de> (raw)
In-Reply-To: <CADtzDC=CLyhxMVcj+HbKMoKVpLZmAiV4gOzPe+EV649hAqLTUA@mail.gmail.com>
References: <CADtzDCkR8O5OJ5bsVs8Lmr3yoi=uuA8GbO-QuNDsnrX9--WubA@mail.gmail.com>
<CADtzDC=02yDT-6rrab6B8_LfKRueqFzKom1VgXyHBhVcM4RziQ@mail.gmail.com>
<CADtzDC=CLyhxMVcj+HbKMoKVpLZmAiV4gOzPe+EV649hAqLTUA@mail.gmail.com>
Hi,
On Wednesday, February 15, 2012 11:19:00 AM Zhou Han wrote:
> I have tried unix domain socket and the performance is similar with
> TCP socket. It is MIPS architecture so memory copy to/from kernel can
> occupy much time, and apparently using unit domain socket has no
> difference than TCP in terms of memory copy.
> But it is still unbelievable for the ten-fold gap between the client
> side statistic and the server side statistics. So I want to know what
> exactly the operations are involved in the server side statistics in
> EXPLAIN ANALYZE. May I check the code later on when I get time.
My guess is that the time difference youre seing is actually the planning time.
The timing shown at the end of EXPLAIN ANALYZE is just the execution, not the
planning time. You can use "\timing on" in psql to let it display timing
information that include planning.
Whats the query?
> For the query itself, it was just for performance comparison. There
> are other index based queries, which are of course much faster, but
> still result in similar ten-fold of time gap between client side and
> server side statistics.
>
> I am thinking of non-kernel involved client interface, is there such
> an option, or do I have to develop one from scratch?
Its unlikely thats possible in a sensible amount of time. But I don't think
thats your problem anyway.
Andres
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andres@anarazel.de, zhouhan@gmail.com
Subject: Re: Fwd: [HACKERS] client performance v.s. server statistics
In-Reply-To: <201202151155.19449.andres@anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox