Re: Performance degradation 8.4 -> 9.1

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance degradation 8.4 -> 9.1
Date: 2011-11-17 20:30:44
Message-ID: 17A46670-FB0F-4968-B055-D44309CF3A04@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Shraibman 2011-11-17 20:52:53 Re: Performance degradation 8.4 -> 9.1
Previous Message Joseph Shraibman 2011-11-17 19:24:41 Performance degradation 8.4 -> 9.1