From: Josh Berkus <josh@agliodbs.com>
To: Ken Egervari <ken@upfactor.com>
Cc: Ragnar Hafstað <gnari@simnet.is>
Cc: pgsql-performance@postgresql.org
Subject: Re: Help with tuning this query (with explain analyze finally)
Date: Wed, 2 Mar 2005 21:52:13 -0800
Message-ID: <200503022152.13211.josh@agliodbs.com> (raw)
In-Reply-To: <000601c51f63$63c8bb10$6a01a8c0@KEN>
References: <001001c51ef4$3849eeb0$6a01a8c0@KEN>
<1109789394.31084.20.camel@localhost.localdomain>
<000601c51f63$63c8bb10$6a01a8c0@KEN>
Ken,
> -> Merge Join (cost=602.54..1882.73 rows=870 width=91) (actual
> time=234.000..312.000 rows=310 loops=1)
> Merge Cond: ("outer".current_status_id = "inner".id)
Hmmm ... this merge join appears to be the majority of your execution
time .... at least within the resolution that PGWin allows us. Please try
two things, and give us Explain Analyzes:
1) To determine your query order ala Dan Tow and drive off of person, please
SET JOIN_COLLAPSE_LIMIT = 1 and then run Mark Kirkwood's version of the
query. (Not that I believe in Dan Tow ... see previous message ... but it
would be interesting to see the results.
2) Force PG to drop the merge join via SET ENABLE_MERGEJOIN = FALSE;
Also, please let us know some about the server you're using and your
configuration parameters, particularly:
shared_buffers
work_mem
effective_cache_size
random_page_cost
--
Josh Berkus
Aglio Database Solutions
San Francisco
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: josh@agliodbs.com, ken@upfactor.com, gnari@simnet.is
Subject: Re: Help with tuning this query (with explain analyze finally)
In-Reply-To: <200503022152.13211.josh@agliodbs.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