X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2A5DE52970 for ; Thu, 23 Jun 2005 17:17:00 -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 37179-06 for ; Thu, 23 Jun 2005 20:16:50 +0000 (GMT) Received: from presinet-main.presinet.com (presinet.com [209.53.156.1]) by svr1.postgresql.org (Postfix) with ESMTP id A1EFB5282E for ; Thu, 23 Jun 2005 17:16:48 -0300 (ADT) Received: from [10.10.1.151] (BRICK [10.10.1.151]) by presinet-main.presinet.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2658.3) id MJ799DNA; Thu, 23 Jun 2005 13:12:55 -0700 Message-ID: <42BB18B2.4040009@PresiNET.com> Date: Thu, 23 Jun 2005 13:16:50 -0700 From: Bricklen Anderson User-Agent: Debian Thunderbird 1.0.2 (X11/20050602) X-Accept-Language: en-us, en MIME-Version: 1.0 To: meetesh.karia@alumni.duke.edu Cc: pgsql-performance@postgresql.org Subject: Re: ETL optimization References: <42BB0F9C.2050207@PresiNET.com> In-Reply-To: X-Enigmail-Version: 0.91.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.016 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/465 X-Sequence-Number: 13102 Meetesh Karia wrote: > I don't know what this will change wrt how often you need to run VACUUM > (I'm a SQL Server guy), but instead of an update and insert, try a > delete and insert. You'll only have to find the duplicate rows once and > your insert doesn't need a where clause. > > Meetesh > Vacuum analyze in generally run about once an hour. You know, I didn't even think to try a delete + insert combo (which will not be visible to the other queries that are occurring). Truncate is out of the question, because of the aforementioned queries, but I'll give the d+i a shot. Thanks! -- _______________________________ This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. _______________________________