pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-performance@postgresql.org
To: brauagustin-susc@yahoo.com.ar
Subject: Re: Low CPU Usage
Date: Fri, 21 Sep 2007 12:51:57 -0500
Message-ID: <46F3BE6C.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <121711.47531.qm@web30006.mail.mud.yahoo.com>
References: <121711.47531.qm@web30006.mail.mud.yahoo.com>

>>> 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
 





view thread (26+ messages)  latest in thread

Message-ID: <46F3BE6C.EE98.0025.0@wicourts.gov>
Permalink:  ../46F3BE6C.EE98.0025.0@wicourts.gov/
Also on:    postgresql.org/message-id/46F3BE6C.EE98.0025.0@wicourts.gov

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, brauagustin-susc@yahoo.com.ar
  Subject: Re: Low CPU Usage
  In-Reply-To: <46F3BE6C.EE98.0025.0@wicourts.gov>

* 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