X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 449BADA38F for ; Thu, 6 Oct 2005 18:26:11 -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 93112-08 for ; Thu, 6 Oct 2005 21:26:06 +0000 (GMT) Received: from TWMAIL.ESNCC.COM (static-66-173-159-28.t1.cavtel.net [66.173.159.28]) by svr1.postgresql.org (Postfix) with ESMTP id E8DD2DA068 for ; Thu, 6 Oct 2005 18:26:06 -0300 (ADT) Received: from spawar2i8uvlb9 ([150.125.117.63]) by TWMAIL.ESNCC.COM with Microsoft SMTPSVC(5.0.2195.6713); Thu, 6 Oct 2005 17:26:22 -0400 From: "Lane Van Ingen" To: Subject: Need Some Suggestions Date: Thu, 6 Oct 2005 17:29:42 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181 X-OriginalArrivalTime: 06 Oct 2005 21:26:22.0476 (UTC) FILETIME=[995034C0:01C5CABC] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.057 required=5 tests=[AWL=0.007, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/131 X-Sequence-Number: 14899 I have an application that is prone to sudden, unscheduled high bursts of activity, and I am finding that the application design permits me to detect the activity bursts within an existing function. The bursts only affect 3 tables, but degradation becomes apparent after 2,000 updates, and significant after 8,000 updates. I already know that a plain vacuum (without full, analyze, or free options) solves my problem. Since vacuum is classified in the documentation as an SQL command, I tried to call it using a trigger function on one the tables (they all have roughly the same insert / update rate). However, I just found out that vacuum cannot be called by a function. Vacuums done by a scheduler at 3AM in the morning are adequate to handle my non-peak needs otherwise. autovacuum sounds like it would do the trick, but I am on a WINDOWS 2003 environment, but I have Googled up messages that it still has various problems (in Windows) which won't be resolved until 8.1 is out. But I have a problem NOW, and the application is deployed around the world. QUESTION: Is there anyway anyone knows of to permit me to execute an operating system program (even vacuumdb) or possibly to add a C function to the library which would allow me to do this (I am not a C programmer, but have access to some persons who are)? Very important to me for performance reasons. Does anybody have some suggestions on the best path for me to take?