Time stamping for incremental data synchronization

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.