Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E4D0F9F9E60 for ; Mon, 27 Aug 2007 10:18:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 89773-06 for ; Mon, 27 Aug 2007 10:17:54 -0300 (ADT) X-Greylist: delayed 01:01:10.611376 by SQLgrey-1.7.5 Received: from ctb-mesg4.saix.net (ctb-mesg4.saix.net [196.25.240.74]) by postgresql.org (Postfix) with ESMTP id 828859F9E44 for ; Mon, 27 Aug 2007 10:18:02 -0300 (ADT) Received: from mirasol.co.za (dsl-240-183-84.telkomadsl.co.za [41.240.183.84]) by ctb-mesg4.saix.net (Postfix) with SMTP id CA7382AE0 for ; Mon, 27 Aug 2007 14:16:48 +0200 (SAST) Received: (qmail 5940 invoked by uid 453); 27 Aug 2007 12:16:48 -0000 X-Virus-Checked: Checked by ClamAV on mirasol.co.za Received: from pc-00052.mirasol.co.za (HELO [172.16.0.52]) (172.16.0.52) by mirasol.co.za (qpsmtpd/0.40) with ESMTP; Mon, 27 Aug 2007 08:16:48 -0400 Message-ID: <46D2C0B0.8080101@studentvillage.co.za> Date: Mon, 27 Aug 2007 14:16:48 +0200 From: Willo van der Merwe User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Performance issue Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/348 X-Sequence-Number: 26478 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 AND id IN () 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. I vacuum and reindex the database daily. I'd prefer not to have to rewrite the code, so any suggestions would be very welcome. Kind regards Willo van der Merwe