Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id ADE409F97B2 for ; Mon, 27 Aug 2007 11:36:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 45412-07 for ; Mon, 27 Aug 2007 11:36:32 -0300 (ADT) X-Greylist: delayed 00:54:43.739877 by SQLgrey-1.7.5 Received: from ctb-mesg-1-2.saix.net (ctb-mesg-1-2.saix.net [196.25.240.80]) by postgresql.org (Postfix) with ESMTP id BBF569F9775 for ; Mon, 27 Aug 2007 11:36:32 -0300 (ADT) Received: from mirasol.co.za (dsl-240-183-84.telkomadsl.co.za [41.240.183.84]) by ctb-mesg-1-2.saix.net (Postfix) with SMTP id 7211A4A5E for ; Mon, 27 Aug 2007 15:41:45 +0200 (SAST) Received: (qmail 6805 invoked by uid 453); 27 Aug 2007 13:41:42 -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 09:41:42 -0400 Message-ID: <46D2D496.60005@mirasol.co.za> Date: Mon, 27 Aug 2007 15:41:42 +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/322 X-Sequence-Number: 26452 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