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

Query statement optimization method and device

A query statement and optimization method technology, applied in the computer field, can solve the problems of increasing the difficulty of maintaining and upgrading the proxy layer, increasing the coupling of the proxy layer, and the inability to guarantee the efficiency of check syntax, etc., so as to reduce the difficulty of subsequent maintenance and upgrading, reduce Coupling, the effect of improving computing efficiency

Active Publication Date: 2021-08-10
BEIJING 58 INFORMATION TECH
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] As can be seen from the above description, the implementation of the syntax in the check statement in the prior art is to configure the check statement at the proxy (proxy) layer through a pre-written configuration file. On the one hand, it cannot be accurate for the specific content of each query statement. Judging the domain or nesting of the check statement does not guarantee the efficiency of the check syntax of each query statement. On the other hand, it increases the coupling of the proxy layer and increases the difficulty of subsequent maintenance and upgrade of the proxy layer.

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

Examples

Experimental program
Comparison scheme
Effect test

example

[0059] In Search, the upper-level query statement is converted into a syntax tree for operation, and each field (query and check) is a separate syntax tree. Take the query statement as an example as follows:

[0060] query=local:(1) ANDparams2306:(50253716473748572)AND(dcateid0:(3306)OR(params7058:(38570865397766601)ANDdcateid0:(574)))

[0061] &&check=postdate:[20140811TO20140922]

[0062] Correspondingly, the syntax tree of the above query in the kernel is as follows image 3 As shown, the Check syntax tree is as follows Figure 4 As shown, the AND operation on the domain local: (1) is optimized as a Check filtering operation, and the optimized syntax tree is obtained as Figure 5 , Figure 6 As shown, among them, Figure 5 For the optimized Query syntax tree, Figure 6 It is the optimized Check syntax tree.

[0063] To sum up, with the help of the technical solution of the embodiment of the present invention, by implementing the check optimization in the kernel searc...

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 query sentence optimization method and device. The method includes: performing the following operations in the management module of each data segment segment of the query search layer: making statistics on the condition characteristics of the query statement of the AND operation, and determining the result set size and nested inclusion corresponding to each condition according to the condition characteristics The number of nodes to obtain the minimum result set; after judging that the user's query statement meets the preset optimization conditions, determine whether to replace the single-field or nested logic and type operations according to the minimum result set and the number of nodes contained in the nesting To check the check filter operation, and replace the logical NOT operation of the query statement with the check filter operation. By means of the technical solution of the present invention, the computing efficiency of the kernel can be improved, and the difficulty of subsequent maintenance and upgrading of the proxy layer can be reduced.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for optimizing a query statement. Background technique [0002] In the prior art, the retrieval model of a search engine is a traditional Boolean model, and the time-consuming calculation mainly occurs in AND or non-logical operations of query statements (query statements). For the query statement of the same type, some conditions of the query statement can be used as the filter operation of the check statement (check statement) to bring about higher efficiency. [0003] In the prior art, the condition of the filter operation of the check statement is manually configured, which is one of the optimization mechanisms in the kernel system. Optimize some fields or nesting in the query statement into check statements to improve the computing efficiency of the kernel. [0004] For example, the local in the query statement in the example can be optimized into the...

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): G06F16/242G06F16/2453
CPCG06F16/2433G06F16/24534
Inventor 代元杰
Owner BEIJING 58 INFORMATION TECH