Query sentence optimization device and query sentence optimization method

A query statement and optimization device technology, which is applied in the field of database query, can solve the problems of unoptimized nested subquery, affecting execution efficiency, etc.

Inactive Publication Date: 2013-01-30
YONYOU NETWORK TECH
View PDF3 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Nested subqueries can solve some complex business requirements, but in many cases, subqueries will contain some redundant field information, that is, field information that is not necessary to appear in the query, which will affect the execution efficiency when executing the qu...

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
  • Query sentence optimization device and query sentence optimization method
  • Query sentence optimization device and query sentence optimization method
  • Query sentence optimization device and query sentence optimization method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] In order to understand the above-mentioned purpose, features and advantages of the present invention more clearly, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0022] In the following description, many specific details are set forth in order to fully understand the present invention, but the present invention can also be implemented in other ways different from those described here, therefore, the present invention is not limited to the specific embodiments disclosed below limit.

[0023] figure 1 A block diagram of a device for optimizing query statements according to an embodiment of the present invention is shown.

[0024] Such as figure 1 As shown, the query statement optimization device 100 of the present invention includes: a query positioning module 102, which acquires the external query and subquery in the original query statement; a query combination module 104, which...

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 a query sentence optimization device which comprises a query location module used for obtaining an external query and a subquery in original inquiry sentence, a query combination module used for combining the external query and the subquery into a new external query and a query sentence generation module used for generating new query sentence according to the new external query. Correspondingly, a query sentence optimization method is further provided. By means of the technical scheme, field information of the queries can be compared according to the external query and the subquery to further judge which fields are redundant fields, filter the redundant fields and improve execution efficiency of structured query language (SQL) sentence. Simultaneously, the external query and the subquery are combined to be operated, nested subqueries are removed, and the aims of flattening and simplifying the SQL sentence are achieved.

Description

technical field [0001] The invention relates to the field of database query, in particular to a device for optimizing a query statement and a method for optimizing a query statement. Background technique [0002] Today, the database has become an indispensable and necessary part of a mature software system, and the query operation on the database is the simplest and most commonly used operation in the database system. However, as the business complexity of enterprises continues to increase, the query operations on the database become more and more complex, which requires writing more complex database query statements, that is, SQL statements, to access the database. Common complex SQL statements generally contain nested subqueries, the simple ones are only nested one level, and the complex ones will be nested several levels. Nested subqueries can solve some complex business requirements, but in many cases, subqueries will contain some redundant field information, that is, f...

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): G06F17/30
Inventor 张一桐
Owner YONYOU NETWORK TECH
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