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 D7092B430C1 for ; Wed, 9 Jul 2003 21:51:02 +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 87328-08 for ; Wed, 9 Jul 2003 18:50:30 -0300 (ADT) Received: from dbdevel.sunwave.net (h64-141-16-15.sunwave.net [64.141.16.15]) by svr1.postgresql.org (Postfix) with ESMTP id 95B9DB439BB for ; Wed, 9 Jul 2003 18:50:30 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by dbdevel.sunwave.net (Postfix) with ESMTP id 8666B178008; Wed, 9 Jul 2003 17:50:32 -0400 (EDT) From: Michael A Nachbaur To: Cliff Wells , pgsql-sql@postgresql.org Subject: Re: Home-brewed table syncronization Date: Wed, 9 Jul 2003 14:50:32 -0700 User-Agent: KMail/1.5 References: <200307091414.19959.mike@nachbaur.com> <1057786137.15508.29.camel@software1.logiplex.internal> In-Reply-To: <1057786137.15508.29.camel@software1.logiplex.internal> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307091450.32440.mike@nachbaur.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/110 X-Sequence-Number: 14224 On Wednesday 09 July 2003 02:28 pm, Cliff Wells wrote: > 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. I'm dealing with an existing database structure that, though I can change it, has a lot of impact on the rest of my infrastructure. If I can find a way of doing this without resorting to timestamps, I'd much rather do it that way. -- /* Michael A. Nachbaur * http://nachbaur.com/pgpkey.asc */ "Rome wasn't burned in a day. "