X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 83CBDB438B1 for ; Wed, 9 Jul 2003 21:29:28 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 79259-04 for ; Wed, 9 Jul 2003 18:28:57 -0300 (ADT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by svr1.postgresql.org (Postfix) with ESMTP id B2975B430CB for ; Wed, 9 Jul 2003 18:28:56 -0300 (ADT) Received: from [65.102.60.133] (helo=software1.logiplex.internal) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 19aMUk-0000Mx-00 for pgsql-sql@postgresql.org; Wed, 09 Jul 2003 14:28:58 -0700 Subject: Re: Home-brewed table syncronization From: Cliff Wells To: pgsql-sql@postgresql.org In-Reply-To: <200307091414.19959.mike@nachbaur.com> References: <200307091414.19959.mike@nachbaur.com> Content-Type: text/plain Organization: Logiplex Corporation Message-Id: <1057786137.15508.29.camel@software1.logiplex.internal> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 09 Jul 2003 14:28:57 -0700 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/109 X-Sequence-Number: 14223 On Wed, 2003-07-09 at 14:14, Michael A Nachbaur wrote: > So, I'm looking at syncronizing 4 tables from one master database to several > child databases. I'm thinking of doing the following with DBD::Multiplex: > > DELETE FROM TableA; > INSERT INTO TableA (..) VALUES (...); > .... > > on all the child databases, but I'm not sure what kind of impact this would > have on my servers. My impression is that this would hammer the indexes, and > might blow any memory optimization out the window. Only a few records in my > dataset will change from time-to-time, but just the process of determining > what is different may take more effort than simply rebuilding. Keep a timestamp associated with each record. Only update the records with timestamps later than your last sync. -- Cliff Wells, Software Engineer Logiplex Corporation (www.logiplex.net) (503) 978-6726 (800) 735-0555