Subject Re: [firebird-support] Re: Select count(*) using pk
Author Ann W. Harrison
dirknaudts wrote:
>
> ...for each of these tables I made a copy table with 'sync_' prefix
> in tablename...
>
> 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 !

The scheme that I outlined uses inserts rather than updates in the table
that holds the "count". When you have several transactions trying to
update the same record, they're going to be serialized (in read
committed mode) or fail with update conflict errors (in snapshot mode).
What I mean by "serialized" is that each update must wait until the one
before it is committed.

Regards,


Ann