pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Dimi Paun <dimi@lattica.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: Bad performance on simple query
Date: Mon, 17 Nov 2008 10:40:12 -0700
Message-ID: <dcc563d10811170940l3a2673a9o19f253b5b10c4c38@mail.gmail.com> (raw)
In-Reply-To: <1226943062.5760.103.camel@dimi.lattica.com>
References: <1226937197.5760.89.camel@dimi.lattica.com>
	<dcc563d10811170853y75b1286fy503d82222b49bf15@mail.gmail.com>
	<1226941621.5760.97.camel@dimi.lattica.com>
	<dcc563d10811170916n622e4f86g8f2b2dbe9b9e2a61@mail.gmail.com>
	<1226943062.5760.103.camel@dimi.lattica.com>

On Mon, Nov 17, 2008 at 10:31 AM, Dimi Paun <dimi@lattica.com> wrote:
>
> On Mon, 2008-11-17 at 10:16 -0700, Scott Marlowe wrote:
>> Ahhh.  Keep in mind that if you just run the query, pgadminIII will
>> tell you how long it took to run AND return all the data across the
>> network, so it will definitely take longer then.  But most of that's
>> network io wait so it's not a real issue unless you're saturating your
>> network.
>
> But that is brutal -- there's no way it can take 20ms for a request
> across an unloaded network.
>
> Moreover, I got something like this:
>
>            pgadminIII | pgsql
> w/o index:     45ms      0.620ms
> w/ index       20ms      0.091ms
>
> How now I try to replicate, and I get 45ms in both cases. This is
> very misleading...

I'm guessing a fair bit of that time is pgadminIII prettifying the
output for you, etc.  I.e. it's not all transfer time.  Hard to say
without hooking some kind of profiler in pgadminIII.  Is psql running
local and pgadminIII remotely?  Or are they both remote?  If both psql
and pgadminIII are remote (i.e. same basic circumstances) then it's
got to be a difference in the client causing the extra time.  OR is
this output of explain analyze?



view thread (10+ messages)  latest in thread

Message-ID: <dcc563d10811170940l3a2673a9o19f253b5b10c4c38@mail.gmail.com>
Permalink:  ../dcc563d10811170940l3a2673a9o19f253b5b10c4c38@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10811170940l3a2673a9o19f253b5b10c4c38@mail.gmail.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: scott.marlowe@gmail.com, dimi@lattica.com
  Subject: Re: Bad performance on simple query
  In-Reply-To: <dcc563d10811170940l3a2673a9o19f253b5b10c4c38@mail.gmail.com>
  References: <1226937197.5760.89.camel@dimi.lattica.com> <dcc563d10811170853y75b1286fy503d82222b49bf15@mail.gmail.com> <1226941621.5760.97.camel@dimi.lattica.com> <dcc563d10811170916n622e4f86g8f2b2dbe9b9e2a61@mail.gmail.com> <1226943062.5760.103.camel@dimi.lattica.com> <dcc563d10811170940l3a2673a9o19f253b5b10c4c38@mail.gmail.com>

* 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