Re: [GENERAL] Performance degradation 8.4 -> 9.1

2011-11-19 Thread Joseph S
More info: I upgraded the database from 8.4 to 9.1 using pg_upgrade, so I have no way of running explain using 8.4. I don't want to do an EXPLAIN ANALYZE because it would bog down the server for too long. I know what it is doing, it's doing a seqscan. This is a table with ~ 5.5 million rows

Re: [GENERAL] Performance degradation 8.4 -> 9.1

2011-11-18 Thread Tomas Vondra
On 18 Listopad 2011, 11:39, Greg Smith wrote: > On 11/17/2011 02:24 PM, 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? >> > > To answer that question in all cases, it's necessary to know a) the > query, b) the PostgreSQL versio

Re: [GENERAL] Performance degradation 8.4 -> 9.1

2011-11-18 Thread Greg Smith
On 11/17/2011 02:24 PM, 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? To answer that question in all cases, it's necessary to know a) the query, b) the PostgreSQL version, c) the table definitions including what indexes ex

Re: [GENERAL] Performance degradation 8.4 -> 9.1

2011-11-17 Thread Joseph Shraibman
On 11/17/2011 03:30 PM, Michael Glaesemann wrote: > > 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 EXPLAI

Re: [GENERAL] Performance degradation 8.4 -> 9.1

2011-11-17 Thread Michael Glaesemann
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 t

[GENERAL] Performance degradation 8.4 -> 9.1

2011-11-17 Thread Joseph Shraibman
This query is taking much longer on 9.1 than it did on 8.4. Why is it using a seq scan? => explain verbose SELECT status,EXISTS(SELECT 1 FROM eventlog e WHERE e.uid = ml.uid AND e.jobid = ml.jobid AND type = 4),EXISTS(SELECT 1 FROM eventlog e WHERE e.uid = ml.uid AND e.jobid = ml.jobid AND type =