SQL statement optimization method and device, equipment, storage medium and product

An optimization method and an optimization device technology, which are applied in the field of SQL databases, can solve problems such as manual optimization, and achieve the effects of improving optimization efficiency and reducing optimization time

Pending Publication Date: 2021-11-02
CHINA UNITED NETWORK COMM GRP CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention provides an SQL statement optimization method, device, equipment, storage medium and product, which are used to solve the problem that existing problems need to be manually optimized when optimizing the existing SQL statement

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 statement optimization method and device, equipment, storage medium and product
  • SQL statement optimization method and device, equipment, storage medium and product
  • SQL statement optimization method and device, equipment, storage medium and product

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] figure 2 It is a schematic flow chart of the SQL statement optimization method provided by Embodiment 1 of the present invention, such as figure 2As shown, the execution subject of the SQL statement optimization method provided in this embodiment is a SQL statement optimization device, and the SQL statement optimization device is located in an electronic device, then the SQL statement optimization method provided in this embodiment includes the following steps:

[0047] Step 101, receiving a structured query language SQL statement audit request, and obtaining the SQL statement to be audited according to the SQL statement audit request.

[0048] In this embodiment, the SQL statement optimization device includes a WEB front end, and the user can input the SQL statement to be audited and the database corresponding to the SQL statement through the SQL entry page corresponding to the WEB front end, thereby triggering the SQL statement audit request, and the SQL statement o...

Embodiment 2

[0059] On the basis of the SQL statement optimization method provided in Embodiment 1 of the present invention, step 103 is further refined, including the following steps:

[0060] Step 1031, obtain the audit score corresponding to the audit result, and determine whether the audit score is equal to the preset score; if yes, execute step 1032; if not, execute step 1033.

[0061] In this embodiment, the audit score corresponding to the audit result is obtained, the corresponding audit score is the total audit score, and the audit total score is obtained by adding the audit scores corresponding to multiple audit score items. Comparing the audit score corresponding to the audit result with the preset score to determine whether the audit score corresponding to the audit result is equal to the preset score, wherein the preset score is the preset total score.

[0062] In step 1032, it is determined that the SQL statement does not need to be optimized.

[0063] In this embodiment, if...

Embodiment 3

[0067] image 3 is a schematic flow diagram of the SQL statement optimization method provided in Embodiment 3 of the present invention, as image 3 As shown, on the basis of the SQL statement optimization method provided in Embodiment 1 of the present invention, step 104 is further refined, including the following steps:

[0068] Step 1041, determine the matching optimization strategy according to the deduction items for review.

[0069] In this embodiment, the audit deduction item is determined according to the audit result, and the mapping relationship between the audit deduction item and the optimization strategy is established in advance according to the audit deduction item. The optimization strategies corresponding to different items are different, and the optimization strategy includes SQL statement modification information , according to the mapping relationship to determine the matching optimization strategy.

[0070] Step 1042, optimize the SQL statement by using t...

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 provides an SQL statement optimization method and device, equipment, a storage medium and a product. The method comprises the following steps: receiving an SQL statement auditing request, and obtaining a to-be-audited SQL statement according to the SQL statement auditing request; adopting a preset SQL auditing strategy to auditing the to-be-audited SQL statement to obtain a corresponding auditing result; determining whether to optimize the SQL statement or not according to the audit result; and if yes, optimizing the SQL statement according to an auditing score deduction item corresponding to the auditing result. According to the method, whether the SQL statement has the problem or not can be determined according to the audit result, so that the SQL statement with the problem is automatically optimized according to the audit score deduction item, the optimization efficiency is improved, and the optimization time is shortened.

Description

technical field [0001] The invention relates to the technical field of SQL databases, in particular to an SQL statement optimization method, device, equipment, storage medium and product. Background technique [0002] Structured Query Language (Structured Query Language), referred to as SQL, is a special-purpose programming language, a database query and programming language, used to access data and query, update and manage relational database systems. [0003] In the work of the database, it is often necessary to audit the SQL statements executed by the database. The audit of the SQL statements of the database is an important part of the software development process. Through the audit, the overall performance of the data can be improved. The existing SQL statement review method is usually manual review or system automatic review. When manual review or system automatic review finds that there is a problem with the SQL statement, the developer is notified that the SQL stateme...

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
IPC IPC(8): G06F16/242
CPCG06F16/2433G06F16/2448Y02D10/00
Inventor 闫彬彬苏宁吴文均梁帅李建斌陈震戚勇崔俊波屈有军华山吴仲圆姜珊
Owner CHINA UNITED NETWORK COMM GRP CO LTD
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