Data synchronization
1, by the time stamp of the record itself to update incrementally
Paging gets must be sorted (timestamp), it will also go wrong after sorting (there will be a case where the record skips), the Midway script stops more error
Non-paged problems, script interrupts are more problematic (timestamps are not guaranteed to be low to high)
Workaround:
1, pagination number of 1, and sorting but not high efficiency
2, paging use each time to obtain a greater than the current time stamp limit number, and then constantly change the timestamp
3, data once all out to sort processing (for small data volume situation)
2, timestamp exists in the cache, and so on after all processing and then update the timestamp
Normal paging will still occur when a record is skipped
Non-paged is not problematic (because the timestamp is last updated) and the script terminal does not have a problem.
summed up in the way:
1. Timestamp exists in cache
1, reduce the calculation
2, the last time to update the timestamp feel more difficult to problem, the most will be repeated processing
2. Each time the cache is run and the time of the script, set the current time to the cache after the run is complete, which reduces the likelihood of repeated runs
3. Traversal mode
1, paging common way, although some cases will be problematic, but can and the full volume of the common set of updates, reduce development time (full update will compensate)
2, if you can use other dimensions, better, because this will not be a problem
Time stamping for incremental data synchronization