pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Joel Fradkin <jfradkin@wazagua.com>
Cc: PostgreSQL Perform <pgsql-performance@postgresql.org>
Subject: Re: speed of querry?
Date: Wed, 13 Apr 2005 18:30:35 +0100
Message-ID: <425D573B.3080208@archonet.com> (raw)
In-Reply-To: <001b01c54036$d49a2290$797ba8c0@jfradkin>
References: <001b01c54036$d49a2290$797ba8c0@jfradkin>

Joel Fradkin wrote:
> I must be missing something important, because I am just not seeing why this
> query is slower on a 4 processor 8 gig machine running redhat AS4.

Well, the 4 processors aren't going to help with a single query. 
However, assuming the configurations for both machines are comparable, 
you shouldn't be seeing a doubling in query-time.

I have, however, spotted something very strange towards the bottom of 
each explain:

> Machine 1 my desktop:

> "        ->  Merge Right Join  (cost=0.00..52366.50 rows=190710 width=75)
> (actual time=16.000..1973.000 rows=177041 loops=1)"
> "              Merge Cond: ((("outer".clientnum)::text =
> ("inner".clientnum)::text) AND ("outer".id = "inner".jobtitleid))"


> Test Linux machine:

> "        ->  Merge Right Join  (cost=24825.80..27512.71 rows=176015
> width=75) (actual time=8743.848..9750.775 rows=177041 loops=1)"
> "              Merge Cond: ((("outer".clientnum)::text =
> "inner"."?column10?") AND ("outer".id = "inner".jobtitleid))"

In the first, we match outer.clientnum to inner.clientnum, in the second 
it's "?column10?" - are you sure the query was identical in each case. 
I'm guessing the unidentified column in query 2 is the reason for the 
sort a couple of lines below it, which seems to take up a large chunk of 
time.

--
   Richard Huxton
   Archonet Ltd



view thread (22+ messages)  latest in thread

Message-ID: <425D573B.3080208@archonet.com>
Permalink:  ../425D573B.3080208@archonet.com/
Also on:    postgresql.org/message-id/425D573B.3080208@archonet.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dev@archonet.com, jfradkin@wazagua.com
  Subject: Re: speed of querry?
  In-Reply-To: <425D573B.3080208@archonet.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