Re: Performance degradation 8.4 -> 9.1 - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: Performance degradation 8.4 -> 9.1
Date
Msg-id 17A46670-FB0F-4968-B055-D44309CF3A04@seespotcode.net
Whole thread Raw
In response to Performance degradation 8.4 -> 9.1  (Joseph Shraibman <jks@selectacast.net>)
Responses Re: Performance degradation 8.4 -> 9.1  (Joseph Shraibman <jks@selectacast.net>)
Re: Performance degradation 8.4 -> 9.1  (Joseph S <jks@selectacast.net>)
List pgsql-general
On Nov 17, 2011, at 14:24, Joseph Shraibman wrote:

> This query is taking much longer on 9.1 than it did on 8.4.  Why is it
> using a seq scan?

Without seeing the table definition (including indexes) as well as the output of EXPLAIN for 8.4, it's kind of hard to
say.

Does this formulation of the query give you a different plan?

SELECT status,
       e4.type IS NOT NULL,
       e1.type IS NOT NULL
  FROM maillog ml
  LEFT JOIN eventlog e4 ON (e4.uid, e4.jobid) = (ml.uid, ml.jobid)
                        AND e4.type = 4
  LEFT JOIN eventlog e1 ON (e1.uid, e1.jobid) = (ml.uid, ml.jobid)
                    AND e1.type = 1
  WHERE jobid = 1132730;

Michael Glaesemann
grzm seespotcode net




pgsql-general by date:

Previous
From: Joseph Shraibman
Date:
Subject: Performance degradation 8.4 -> 9.1
Next
From: Joseph Shraibman
Date:
Subject: Re: Performance degradation 8.4 -> 9.1