Skip site navigation (1) Skip section navigation (2)

Re: Performance issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Willo van der Merwe <willo(at)mirasol(dot)co(dot)za>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance issue
Date: 2007-08-27 15:55:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Willo van der Merwe <willo(at)mirasol(dot)co(dot)za> writes:
> I have something odd. I have Gallery2 running on PostgreSQL 8.1, and
> recently I upgraded to 8.1.9-1.el4s1.1 (64bit). The issue here really is
> how do I get PostgreSQL to work with their horrible code. The queries
> they generate look something like :
> SELECT blah, blah FROM table1, table2 WHERE <some relational stuff> AND
> id IN (<here a list of 42000+ IDs are listed>)

> On the previous version (which I can't recall what it was, but it was a
> version 8.1) the queries executed fine, but suddenly now, these queries
> are taking up-to 4 minutes to complete. I am convinced it's the
> parsing/handling of the IN clause.

You're wrong about that, because we have not done anything to change IN
planning in 8.1.x.  You might need to re-ANALYZE or something; it sounds
to me more like the planner has changed strategies in the wrong direction.

FWIW, 8.2 should be vastly more efficient than 8.1 for this sort of
query --- any chance of an upgrade?

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Decibel!Date: 2007-08-27 20:11:38
Subject: Re: asynchronous commit feature
Previous:From: Bill MoranDate: 2007-08-27 14:45:20
Subject: Re: Performance issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group