Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Structured query statement optimization method and device, equipment and storage medium

A technology of structured query and optimization method, applied in the database field, can solve the problems affecting the execution performance of SQL statements, multi-computing resources, occupation, etc., and achieve the effect of solving complex computing and energy consumption, simplifying grouping computing, and reducing the number of

Pending Publication Date: 2020-06-19
SHANGHAI DAMENG DATABASE
View PDF4 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In database operations based on SQL statements, grouping is a commonly used operation in SQL statements. However, in practical applications, if the formed SQL statement contains too many grouping items, or the grouping items contained in the SQL statement are in Complex calculations are required during execution, so the grouping operation will take up more computing resources and affect the execution performance of SQL statements

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] figure 1 This is a flow chart of the method for optimizing structured query statements provided in the first embodiment of the present invention. This embodiment is applicable to the case of optimizing SQL statements containing grouped statements. The method can be executed by an optimizing device for structured query statements. , The device can be realized by software and / or hardware.

[0038] Such as figure 1 As shown, the method specifically includes the following steps:

[0039] Step 110: Obtain a SQL statement containing a grouping statement.

[0040] Among them, the data in the database is often for query. Therefore, data query is the core operation of the database. In database applications, SQL statements are often used to implement various database operations. Data query can also be implemented in SQL language. , The prerequisite for SQL statements to perform various operations is to select the data objects to be operated, and the selection of data operation objects ...

Embodiment 2

[0118] The device for optimizing structured query statements provided by the embodiments of the present invention can execute the method for optimizing structured query statements provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. Figure 4 It is the structural block diagram of the structured query sentence optimization device provided in the second embodiment of the present invention, such as Figure 4 As shown, the device includes: a sentence acquisition module 210, an elimination determination module 220, and a sentence determination module 230.

[0119] The statement acquisition module 210 is used to acquire a structured query SQL statement containing grouping statements.

[0120] The elimination determination module 220 is configured to determine the grouping items to be eliminated that meet the elimination conditions contained in the grouping sentence.

[0121] The statement determining mo...

Embodiment 3

[0138] Figure 5 This is a structural block diagram of a computer device provided in the third embodiment of the present invention, such as Figure 5 As shown, the computer device includes a processor 310, a memory 320, an input device 330, and an output device 340; the number of processors 310 in the computer device may be one or more, Figure 5 Take a processor 310 as an example; the processor 310, the memory 320, the input device 330, and the output device 340 in the computer equipment can be connected by a bus or other means, Figure 5 Take the bus connection as an example.

[0139] As a computer-readable storage medium, the memory 320 can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the method for optimizing structured query sentences in the embodiment of the present invention (for example, structured query The sentence acquisition module 210, the elimination determination module 220 an...

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 a structured query statement optimization method and device, equipment and a storage medium. The method comprises the steps of obtaining a structured query SQL statement containing grouped statements; determining a to-be-eliminated grouping item which is contained in the grouping statement and meets an elimination condition; and eliminating the to-be-eliminated grouping item from the SQL statement to obtain a target SQL statement. The method comprises the following steps of: determining to-be-eliminated grouping items which are contained in grouping statements and meetelimination conditions; according to the method, the to-be-eliminated grouping items are eliminated from the SQL statements, the target SQL statements are obtained, when the target SQL statements areexecuted, the number of the grouping items is reduced, grouping calculation is simplified, the problem that too many grouping items exist or calculation is complex and consumes energy is solved, and the effect of rapidly completing grouping is achieved.

Description

Technical field [0001] The embodiment of the present invention relates to the field of database technology, and in particular to a method, device, equipment and storage medium for optimizing structured query statements. Background technique [0002] Structured Query Language (Structured Query Language, SQL), a database query and programming language used to access data and query, update and manage relational database systems. [0003] In SQL statement-based database operations, grouping is a common operation in SQL statements. However, in practical applications, if the formed SQL statement contains too many grouping items, or the grouping items contained in the SQL statement Complex calculations are required during execution, so the grouping operation will take up more computing resources and affect the execution performance of SQL statements. Summary of the invention [0004] The present invention provides a method, device, equipment and storage medium for optimizing structured qu...

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/242
CPCG06F16/244Y02D10/00
Inventor 张钦刘志勇韩朱忠
Owner SHANGHAI DAMENG DATABASE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products