Re: Low CPU Usage - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Low CPU Usage
Date
Msg-id 46F3BE6C.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to Re: Low CPU Usage  (brauagustin-susc@yahoo.com.ar)
List pgsql-performance
>>> On Fri, Sep 21, 2007 at 12:30 PM, in message
<121711.47531.qm@web30006.mail.mud.yahoo.com>, <brauagustin-susc@yahoo.com.ar>
wrote:

> This is the plan for the old server:
> Hash Join  (cost=449.55..8879.24 rows=136316 width=904) (actual
> time=50.734..1632.491 rows=136316 loops=1)
. . .
> Total runtime: 2022.293 ms

> And this is the plan for the new server:
> Hash Join  (cost=412.86..9524.13 rows=136316 width=905) (actual
> time=9.421..506.376 rows=136316 loops=1)
. . .
> Total runtime: 553.619 ms

> I see an "outer" join in the plan for the new server. This is weird!!! There
> are the same databases in both servers.

That's just a matter of labeling the tables with role rather than alias.
The plans look the same to me.

> The old one runs this query for about 37 seconds and for the new one for
> about 301 seconds.

That's not what it looks like based on the EXPLAIN ANALYZE output.
It looks like run time dropped from two seconds to half a second.

It seems as though you either have a network delay delivering the results,
or your application is slow to read them.

Exactly how are you arriving at those timings you're reporting to us?

-Kevin




pgsql-performance by date:

Previous
From: brauagustin-susc@yahoo.com.ar
Date:
Subject: Re: Low CPU Usage
Next
From: Tom Lane
Date:
Subject: Re: Searching for the cause of a bad plan