Re: Bad performance on simple query

From: ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To:
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Bad performance on simple query
Date: 2008-11-17 17:45:01
Message-ID: F15CC409-35D6-46D5-9100-83D6E8958A77@rvt.dds.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On Nov 17, 2008, at 12:40 PM, Scott Marlowe wrote:

> On Mon, Nov 17, 2008 at 10:31 AM, Dimi Paun <dimi(at)lattica(dot)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?
>

Side note: I haven't seen pgAdminIII never show a time below 20ms (the
time on the bottom right corner).

When I do a query like this : select 1; it takes according to
pgAdminIII around 20ms. (whatever that time is)

what I normally do to find my real query time is put and explain
analyse in front of my query to know to real query time.

Ries

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dimi Paun 2008-11-17 18:14:14 Re: Bad performance on simple query
Previous Message Scott Marlowe 2008-11-17 17:40:12 Re: Bad performance on simple query