Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

SQL storage process script optimization method and device

A stored procedure and optimization method technology, applied in the computer field, can solve problems affecting user experience, error reporting, long system response time, etc., to achieve the effect of reducing system response time, reducing execution time, and improving user experience

Pending Publication Date: 2020-10-02
BANK OF CHINA
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the development process of the existing system, due to the different proficiency in the development of SQL, the SQL stored procedure actually running in many systems is relatively complex, resulting in a long system response time, and even an error report due to running timeout, which seriously affects the user experience.

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
  • SQL storage process script optimization method and device
  • SQL storage process script optimization method and device
  • SQL storage process script optimization method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] An embodiment of the present application provides a method for optimizing an SQL stored procedure script, which will be described in detail below with reference to the accompanying drawings. see figure 1 , which is a flow chart of a method for optimizing a SQL stored procedure script provided in an embodiment of the present application, the method comprising the following steps:

[0039] S101. Decompose the SQL stored procedure script to be optimized layer by layer to obtain multiple sub-script modules.

[0040] In the embodiment of this application, the SQL stored procedure script to be optimized may be a SQL stored procedure script that needs to be optimized, which is written by the developer according to the business logic and is used to implement more complex logical operations. Due to the different proficiency of the developer, it may be There are repeated statements, so they can be analyzed as SQL stored procedure scripts to be optimized.

[0041] Specifically, ...

Embodiment 2

[0056] Based on the method for optimizing SQL stored procedure scripts provided in the foregoing embodiments, Embodiment 2 of the present application also provides an optimization device for SQL stored procedure scripts, which will be described in detail below with reference to the accompanying drawings.

[0057] see Figure 4 , which is a schematic diagram of an optimization device for a SQL stored procedure script provided in an embodiment of the present application, and the device may include:

[0058] The script decomposing unit 110 is used to decompose the SQL stored procedure script to be optimized layer by layer to obtain a plurality of sub-script modules; each of the sub-script modules corresponds to at least one function;

[0059] A module determining unit 120, configured to determine repeated subscript modules in the SQL stored procedure script;

[0060] The script optimization unit 130 is used to add the statement that assigns the sub-script module to the correspon...

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 provides an optimization method and device for an SQL storage process script. The method comprises the following steps: decomposing a to-be-optimized SQL storage process script layer by layer; obtaining a plurality of sub-script modules, wherein each sub-script module can correspond to at least one function; determining repeated sub-script modules in the SQL storageprocess script, adding statements for assigning values to the sub-script modules as corresponding global variables in the SQL storage process script, and replacing the sub-script modules with the corresponding global variables to obtain an optimized SQL storage process script. That is to say, it is possible to obtain a product, repeated statements in the SQL storage process script are replaced with global variables. The global variable is assigned as an original statement; in this way, redundant repeated statements in the script in the SQL storage process are reduced, the script is simplified, in the script execution process, repeated actions do not need to be executed according to the repeated statements, operations needing to be executed are reduced in a calling mode, and therefore thescript execution time is shortened, and the system response time is shortened.

Description

technical field [0001] The present application relates to the field of computers, in particular to a method and device for optimizing SQL stored procedure scripts. Background technique [0002] Structured Query Language (Structured Query Language, SQL) is a special-purpose programming language. It is a data query and programming language for accessing data and querying, updating and managing relational database systems. Procedure) is a set of SQL statements to complete a specific function in a large database system. It can be stored in the database, and users can execute the stored procedure by specifying the name of the stored procedure. [0003] SQL stored procedures can be seen everywhere in various code developments, especially in the scenarios of fetching / computing complex logic systems such as reports. The execution time and performance of SQL directly determine the response time of the system, and also largely determine the user's experience. In the development proc...

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/242G06F8/30
CPCG06F16/2433G06F8/31
Inventor 王志翔
Owner BANK OF CHINA
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
Eureka Blog
Learn More
PatSnap group products