Unlock instant, AI-driven research and patent intelligence for your innovation.

A method for dynamically adjusting the execution frequency of SQL statements

A dynamic adjustment and sentence technology, applied in special data processing applications, instruments, electrical digital data processing, etc., can solve problems such as inapplicability, insufficient knowledge understanding, and increased database burden, so as to achieve the effect of improving processing performance

Active Publication Date: 2018-04-17
SHANGHAI SNC NET INFORMATION TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] 1. The SQL statement does not use bind variables. The unique value of each predicate may generate different SQL statements during the query, and multiple predicates may even generate a Cartesian product, resulting in a large number of SQL statements generated by the same query function point. , the execution frequency of each SQL is very low, repeated parsing in the database greatly increases the burden on the database, and causes memory fragmentation problems
[0004] 2. SQL statements use bind variables, but due to frequent foreground business operations, a certain SQL execution frequency is too high. When a session tries to obtain a cursor in shared mode, it needs to modify the reference count of the corresponding Mutex structure, resulting in competition And non-idle waiting, affecting the execution time of SQL
[0009] 1. Developers do not have a deep understanding of database expertise, and it is difficult to fully manage and control the release of the version. Now there are still many unused binding variables in various database systems, but the transformation work involves code changes, and there are risks
[0010] 2. The distribution of predicate values ​​will change as the data grows, and the design considerations are not applicable to the changed situation
[0011] 3. The frequency of SQL will change with business growth. Splitting SQL during design involves code changes and cannot be adjusted dynamically

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
  • A method for dynamically adjusting the execution frequency of SQL statements
  • A method for dynamically adjusting the execution frequency of SQL statements
  • A method for dynamically adjusting the execution frequency of SQL statements

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0029] figure 1 It is a schematic diagram of the database architecture used in the present invention.

[0030] See figure 1 , the present invention designs an intermediate layer between the client and the database end, collects the database and related SQL operation information at the database end, performs calculations and stores them in the intermediate layer, and when the intermediate layer receives the request from the client, it decides to process it according to the collected information way, and forwarded to the database side.

[0031] Please continue to see figure 2 and image 3 , the SQL statement execution frequency dynamic adjustment method provided by the present invention comprises the following steps:

[0032] S1, monitoring

[0033] Receive the request sent by the client to obtain the SQL statement for operating the database.

[0...

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 invention discloses an SQL statement execution frequency dynamic regulation method. The SQL statement execution frequency dynamic regulation method comprises the following steps of a, monitoring sending requests of a client side, and obtaining SQL statements of an operation database; b, performing parsing and regularization treatment on the obtained SQL statements, and binding variables uniformly; c, regularly gathering the execution frequencies of the regulated SQL statements in a database server side; d, if the execution frequency of one SQL statement exceeds a preset frequency threshold value, generating a new SQL statement to repeat the step b, and sending the new SQL after regulated to the database server side to be operated. According to the SQL statement execution frequency dynamic regulation method, the bond variable use in a development stage is not needed to be concerned, codes are not needed to be modified, the SQL is regulated automatically through an interlayer, the bound variables are used uniformly, the distribution condition of data values is regularly gathered, the dynamic regulation on the situation whether the SQL uses the bound variables or not is performed, and therefore a channel is regulated dynamically to be adapted to the SQL frequency fluctuation condition and improve the database processing performance.

Description

technical field [0001] The invention relates to a database optimization processing method, in particular to a method for dynamically adjusting the execution frequency of SQL statements. Background technique [0002] During the operation of the database system, the following two situations often occur: [0003] 1. The SQL statement does not use bind variables. The unique value of each predicate may generate different SQL statements during the query, and multiple predicates may even generate a Cartesian product, resulting in a large number of SQL statements generated by the same query function point. , the execution frequency of each SQL is very low, and repeated parsing in the database greatly increases the burden on the database and causes memory fragmentation problems. [0004] 2. SQL statements use bind variables, but due to frequent foreground business operations, a certain SQL execution frequency is too high. When a session tries to obtain a cursor in shared mode, it ne...

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 Patents(China)
IPC IPC(8): G06F17/30
CPCG06F16/2453G06F16/284
Inventor 程永新宋辉孙田
Owner SHANGHAI SNC NET INFORMATION TECH CO LTD