Subject Replication - Was: Select count(*) using pk
Author Alan McDonald
> Well, I tried setting up sth similar :
> situation sketch :
>
> I need to keep track of all dml on about 28 tables. (Those changes
> need to be synchronized 'in realtime' with a copy database on another
> server).
> So for each of these tables I made a copy table with 'sync_' prefix
> in tablename, which contains the same fields as the original + syncid
> (pk), synctimestamp and updateflag (for I,U,D) and which is fed by
> after triggers on the original tables.
>
> I created a table SyncStats with TblId,Tblname,Todo, done as fields
> with a record for each of these 28 tables.
>
> I added after insert and after delete triggers on every SYNC_* table
> to keep track of the count in the sync tables. (so that's twice 28
> triggers (Insert and delete) working on this one table, each on its
> own record though)
>
> Every Insert in a Sync_* table results in a todo field increment,
> a delete means a done field increment for the relevant 'synctable'
> record.
>
> All off this to give system admin a quick overview of the
> synchronization status on all tables.
>
> Although SyncStats table only contains 28 records, and all updates
> are where tblid = xxx (so using Pk) it really slowed down the inserts
> and deletes on the sync* tables !
>
> So I had to let go off this mechanism, since my DBSyncronizer
> application (running on master server) couldn't keep up with the
> actual DML (it was running behind)
>
> Maybe anybody got any other hints / ideas to implement this in a
> different way ? I really don't need an absolutely accurate overview
> of the count in the sync tables (so don't care about active
> Transactions) , I only want to have an immediate overall overview to
> see syncronization is ok and up to date with production data.
>
> Sorry for this lengthly explanation, I made it as short as possible ;-
> )
>
> Thanks for any input,
>
> best regards,
> Dirk Naudts.
I think you jsut need replication.
Look a www.IBPhoenix.com.au
for a list of suitable candidates
Alan
PS - this has very little to do with "Select count(*) using pk"