Transaction operation merging execution method and device based on log analysis synchronization
A transaction operation and execution method technology, applied in the computer field, can solve the problems of low target execution efficiency, low operation merging efficiency, low operation merging rate, inability to effectively improve synchronization performance, etc., so as to improve synchronization performance, improve merger efficiency, and improve The effect of the merger rate
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0054] 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.
[0055] 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
[0072] The above-mentioned embodiment 1 introduces the main steps of a transaction merge 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 merge execution method in embodiment 1 in detail.
[0073] combine figure 2 According to an embodiment of the present invention, a method for merging execution of transaction operations based on log parsing and synchronization specifically includes the following steps:
[0074] 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.
[0075] In order to facilitate subsequent operations, after the database sy...
Embodiment 3
[0108] On the basis of the above-mentioned embodiment 1 and embodiment 2, the embodiment of the present invention provides a specific example of a log parsing and synchronization-based transaction merge execution method, so as to better understand the entire transaction merge execution process.
[0109] In this specific embodiment, it is assumed that both the source database and the destination database have table T1 (IDVARCHAR).
[0110] The source application has two transactions TRX1 and TRX2, and performs the following operations on table T1:
[0111] TRX1: INSERT INTO T1(ID) VALUES('TRX1_T1_1');
[0112] TRX2:INSERT INTO T1(ID)VALUES('TRX2_T1_10');
[0113] TRX1:UPDATE T1 SET ID='TRX1_T1_2' WHERE ID='TRX1_T1_2';
[0114] TRX1: COMMIT;
[0115] TRX2: INSERT INTO T1(ID) VALUES('TRX2_T1_20');
[0116] TRX2: COMMIT;
[0117] After the sequence of the above operations is received by the log receiving thread, the situation shown in Table 1 will be formed.
[0118] Table 1...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


