Data operation optimization method, device and system, equipment and storage medium

A technology of data operation and optimization method, which is applied in the field of database processing, and can solve problems such as the inability to guarantee the accuracy of data reading and the inability to execute SQL operation statements for read operations

Active Publication Date: 2019-08-30
SHANGHAI DAMENG DATABASE
View PDF9 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the current read-write separation scheme, the backup database can only execute SQL operation statements that only have read operations in database transactions, and cannot execute SQL operation statements corresponding to read operations in mixed-read database transactions, otherwise data reading cannot be guaranteed the accuracy of

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data operation optimization method, device and system, equipment and storage medium
  • Data operation optimization method, device and system, equipment and storage medium
  • Data operation optimization method, device and system, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] Figure 1A It is a flow chart of a data operation optimization method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where data read-write separation is realized in any database. A data operation optimization method provided in this embodiment can be executed by the data operation optimization device provided in the embodiment of the present invention, and the device can be realized by means of software and / or hardware, and integrated in the device that executes the method In this embodiment, the device executing the method may be any smart terminal carrying a database application, such as a tablet computer, a desktop computer, or a notebook.

[0036] Specifically, refer to Figure 1A , the method may include the following steps:

[0037] S110. Determine a target SQL operation statement in a currently started database transaction.

[0038] Specifically, in order to ensure that the database can maintain data consistency...

Embodiment 2

[0046] Figure 2A It is a flow chart of a data operation optimization method provided in Embodiment 2 of the present invention, Figure 2B It is a schematic diagram of the principle of the data operation optimization process provided by Embodiment 2 of the present invention. This embodiment is optimized on the basis of the foregoing embodiments. Optionally, this embodiment mainly explains in detail the specific process of other operations that exist in the optimization of data operations.

[0047] optional, such as Figure 2A As shown, this embodiment may specifically include the following steps:

[0048] S210. Determine the target SQL operation statement in the currently started database transaction.

[0049] S220, distributing the first SQL operation statement before the target SQL operation statement to the backup database, and distributing the target SQL operation statement and the second SQL operation statement after the target SQL operation statement to the primary d...

Embodiment 3

[0064] image 3 A schematic structural diagram of a device for optimizing data operations provided by Embodiment 3 of the present invention, as shown in image 3 As shown, the device may include:

[0065] The target statement determination module 310 is used to determine the target SQL operation statement in the currently started database transaction, and the target SQL operation statement is the SQL operation statement corresponding to the first write operation in the database transaction;

[0066] The statement distribution module 320 is used for distributing the first SQL operation statement before the target SQL operation statement to the backup database, and distributing the target SQL operation statement and the second SQL operation statement after the target SQL operation statement to the main database, so that the backup database The first SQL operation statement is executed, and the main database executes the target SQL operation statement and the second SQL operatio...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a data operation optimization method, device and system, equipment and a storage medium. The data operation optimization method comprises the steps: determining a target SQL operation statement in a currently started database transaction, wherein the target SQL operation statement is an SQL operation statement corresponding to a first write operation in the database transaction; and distributing the first SQL operation statement before the target SQL operation statement to a backup database, and distributing the target SQL operation statement and the second SQL operation statement after the target SQL operation statement to a main database. According to the technical scheme provided by the embodiment of the invention, the first SQL operation statement is executed by the backup database, and the database transaction does not change any data, so that the data accessed to the backup database by the client is consistent with the data accessed to the main database, and the main database executes the target SQL operation statement and the second SQL operation statement, so that the separation processing of the read-write operation in the databasetransaction is realized, and the data reading accuracy is improved.

Description

technical field [0001] The embodiments of the present invention relate to the field of database processing, and in particular, to an optimization method, device, system, equipment and storage medium for data operation. Background technique [0002] In the database, Structured Query Language (Structured Query Language, SQL) is an operation command set established for the database, including read and write operations; in order to improve the efficiency of reading and writing data in the database, usually through the main database and backup The database uses data read and write separation to read and write data in the database. [0003] At present, when the client executes a database transaction, it first judges the type of operation that exists in the SQL operation statement corresponding to the database transaction. If there is only a read operation, the SQL operation statement is executed through the backup database; if there is a write operation, it is executed through the...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/242G06F16/245
CPCG06F16/2433G06F16/245
Inventor 郭振岗韩朱忠
Owner SHANGHAI DAMENG DATABASE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products