pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Moran <wmoran@collaborativefusion.com>
To: Willo van der Merwe <willo@mirasol.co.za>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance issue
Date: Mon, 27 Aug 2007 10:45:20 -0400
Message-ID: <20070827104520.d139433c.wmoran@collaborativefusion.com> (raw)
In-Reply-To: <46D2D496.60005@mirasol.co.za>
References: <46D2D496.60005@mirasol.co.za>

In response to Willo van der Merwe <willo@mirasol.co.za>:

> Hi Guys,
> 
> 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. It could, of course, be that the list
> has grown so large that it can't fit into a buffer anymore. For obvious
> reasons I can't run an EXPLAIN ANALYZE from a prompt.

Those reasons are not obvious to me.  The explain analyze output is
going to be key to working this out -- unless it's something like
your postgresql.conf isn't properly tuned.

> I vacuum and
> reindex  the database daily.
> 
> I'd prefer not to have to rewrite the code, so any suggestions would be
> very welcome.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023



view thread (13+ messages)  latest in thread

Message-ID: <20070827104520.d139433c.wmoran@collaborativefusion.com>
Permalink:  ../20070827104520.d139433c.wmoran@collaborativefusion.com/
Also on:    postgresql.org/message-id/20070827104520.d139433c.wmoran@collaborativefusion.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: wmoran@collaborativefusion.com, willo@mirasol.co.za
  Subject: Re: Performance issue
  In-Reply-To: <20070827104520.d139433c.wmoran@collaborativefusion.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox