Re: Huge difference in query performance between 8.3 and 8.4 (possibly) - Mailing list pgsql-performance

From Hartman, Matthew
Subject Re: Huge difference in query performance between 8.3 and 8.4 (possibly)
Date
Msg-id 366642367C5B354197A1E0D27BC175BD0225987D@KGHMAIL.KGH.ON.CA
Whole thread Raw
In response to Huge difference in query performance between 8.3 and 8.4 (possibly)  (Robin Houston <robin.houston@gmail.com>)
List pgsql-performance
> From: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-
> owner@postgresql.org] On Behalf Of Robin Houston
> Sent: Thursday, July 09, 2009 12:35 PM

> We have a query that runs very slowly on our 8.3 database. (I can't
> tell you exactly how slowly, because it has never successfully run to
> completion even when we left it running overnight.) On the 8.4
> database on my laptop, it runs in about 90 seconds.
> Any insights would be much appreciated.

I doubt this is the insight you're looking for, but that is the worst
query I have ever seen. It is difficult to understand exactly what it
returns. There are so many cross joins, outer joins, and inner joins
mixed up together, ugh.

Rather than trying to puzzle out why it is slow, rewrite it. It will be
faster than before on any version.

Matthew Hartman
Programmer/Analyst
Information Management, ICP
Kingston General Hospital


pgsql-performance by date:

Previous
From: "Haszlakiewicz, Eric"
Date:
Subject: embedded sql regression from 8.2.4 to 8.3.7
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Sorting by an arbitrary criterion