X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 33F3352A94 for ; Fri, 29 Jul 2005 06:36:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87694-09 for ; Fri, 29 Jul 2005 09:36:12 +0000 (GMT) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by svr1.postgresql.org (Postfix) with ESMTP id ABF7C52AC3 for ; Fri, 29 Jul 2005 06:36:10 -0300 (ADT) Received: from [212.159.2.3] (helo=[172.29.32.160]) by pih-relay04.plus.net with esmtp (Exim) id 1DyRHn-0000sp-7b for pgsql-admin@postgresql.org; Fri, 29 Jul 2005 10:36:11 +0100 Message-ID: <42E9F889.10604@plus.net> Date: Fri, 29 Jul 2005 10:36:09 +0100 From: John Abel User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Speed Up clean_pending.pl? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200507/235 X-Sequence-Number: 18291 Hi, The company I'm at is running dbmirror, and we've found a problem with clean_pending,pl, in that it takes an age to run. I've done some looking about, and came with up this: http://www.postgresql.org/docs/7.4/interactive/indexes.html After reading the comments on that page, I explain'd the query that clean_pending runs, and found that it is performing a sequential scan on each of the tables. Is there a way to make it use the indexes? Any help would be appreciated. Thanks John