Take the 2-minute tour ×  I'm working on a system that mirrors
remote datasets using initials and deltas. When an initial comes
in, it mass deletes anything preexisting and mass inserts the
fresh data. When a delta comes in, the system does a bunch of
work to translate it into updates, inserts, and deletes.
Initials and deltas are processed inside long transactions to
maintain data integrity.  Unfortunately the current solution
isn't scaling very well. The transactions are so large and long
running that our RDBMS bogs down with various contention
problems. Also, there isn't a good audit trail for how the
deltas are applied, making it difficult to troubleshoot issues
causing the local and remote versions of the dataset to get out
of sync.  One idea is to not run the initials and deltas in
transactions at all, and instead to attach a version number to
each record indicating which delta or initial it came from. Once
an initial or delta is successfully loaded, the application can
be alerted that a new version of