Transaction merging execution method and device based on log analysis synchronization
An execution method and transaction technology, applied in the computer field, can solve problems such as low execution efficiency of the target end, low operation merge rate, and inability to effectively improve synchronization performance, so as to achieve the effects of improving synchronization performance, improving execution efficiency, and increasing merge rate
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0044] Data synchronization When synchronizing transactions with the target database, the operation should be performed in order to minimize the number of interactions with the database, because each interaction with the database will bring additional overhead, and it takes much time to perform an insert operation with a batch of 1,000 rows It takes less time than inserting one row a thousand times, so operation merging is a very important technique in data synchronization. Log-based parsing and synchronization is based on transactions, so merging multiple small transactions into one large transaction, and then merging and executing the operations in the large transaction can effectively improve synchronization performance.
[0045] The database log uses a serial method when writing the operations in the database to the log, that is to say, the logs generated by the transaction operations executed in parallel in the database will be written into the log file alternately. In vi...
Embodiment 2
[0056] The above-mentioned embodiment 1 introduces the main steps of a transaction consolidation execution method based on log parsing and synchronization. On this basis, the embodiment of the present invention further introduces the complete steps of the transaction consolidation execution method in embodiment 1 in detail.
[0057] combine figure 2 According to an embodiment of the present invention, a log parsing and synchronization-based transaction merge execution method specifically includes the following steps:
[0058] Step 101, deploying a synchronization system on the source database and the destination database. Among them, the source-end database synchronization system is used to read logs from the source-end database, and the destination-end database synchronization system is responsible for applying the synchronization operation sent by the source to the destination-end database.
[0059] In order to facilitate subsequent operations, after the database synchroni...
Embodiment 3
[0088] On the basis of the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present invention provides a specific example of a transaction consolidation execution method based on log parsing and synchronization, so as to better understand the entire transaction consolidation execution process.
[0089] In this specific embodiment, it is assumed that both the source database and the destination database have tables T1 (ID VARCHAR) and T2 (ID VARCHAR).
[0090] The source application has three transactions, and performs the following operations on tables T1 and T2:
[0091] TRX1: INSERT INTO T1(ID) VALUES('TRX1_T1_1');
[0092] TRX2:INSERT INTO T1(ID)VALUES('TRX2_T1_10');
[0093] TRX1:INSERT INTO T1(ID)VALUES('TRX1_T1_2');
[0094] TRX1:UPDATE T1SET ID='TRX1_T1_2' WHERE ID='TRX1_T1_2';
[0095]TRX3:INSERT INTO T2(ID)VALUES('TRX3_T2_300');
[0096] TRX3:INSERT INTO T1(ID)VALUES('TRX3_T1_30');
[0097] TRX1: COMMIT;
[0098] TRX2: INSERT INTO T1(ID) VALU...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


