亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

php - Synchronize data between two tables
天蓬老師
天蓬老師 2017-07-03 11:40:18
0
1
963

Table A and Table B (Table B wants to synchronize the data in Table A. The account field in Table A is the same as the account field in Table B. The condition for synchronization is that the account field exists in Table A but not in Table B. time, you need to take out the account field in table A and write it to table B synchronously) Please share a good solution for the situation where the amount of data is large and growing

天蓬老師
天蓬老師

歡迎選擇我的課程,讓我們一起見證您的進(jìn)步~~

reply all(1)
扔個三星炸死你

1. Option 1: When there is an operation of writing to table A, the writing operation of table B is also performed immediately.

add(data){
    insertA(data);
    insertB(data);
}

2. Option 2: When there is an operation to write to table A, write the record to the queue and write it to table B asynchronously.

add(data){
    insertA(data);
    synQueue2B(data);
}

In addition, both solutions can write another job to regularly compare the set of account fields in tables A and B for data synchronization

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template