Patent ID: 8756192

Claim:
A method for distributing one or more replication commands, comprising: (a) receiving a log from a source database, wherein the log comprises the replication commands to be applied at a destination database; (b) generating a hash value for a constraint of one of the replication commands; (c) determining whether the hash value exists in a hash table of constraints of replication commands previously dispatched but not yet committed, the hash table storing hash values of constraints of replication commands and associated stream identifiers identifying which of a plurality of streams the associated replication command was transmitted; (d) when the generated hash value exists in the hash table, based on the associated stream identifier associated with the hash value previously stored in the hash table, dispatching the one of the replication commands into a same stream of the plurality of streams as the previously dispatched replication command, wherein the plurality of streams connects the source database to the destination database; and (e) when the generated hash value does not exist in the hash table, dispatching the one of the replication commands into one of the plurality of streams and storing the generated hash value in the hash table along with a stream identifier identifying the one of plurality of streams, wherein generating the hash value comprises: identifying the constraint for the one of the replication commands; identifying a constraint ID for the constraint; generating a constraint value for the constraint ID using a hash algorithm; concatenating the constraint value and the constraint ID into a binary string; and associating the binary string with the one of the replication commands.