Query statement optimization method and apparatus
A query statement and optimization device technology, applied in the field of data query, can solve problems such as occupation and large storage space
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0107] The embodiment of the present invention provides a query optimization method, such as figure 1 shown, including:
[0108] 101. Receive n query statements; wherein, n≥2, and n is an integer.
[0109] The execution body of the method for optimizing query statements provided by the embodiments of the present invention may be a big data query system, and the big data query system may include but not limited to Hive, Shark, or Impala. The method for optimizing a query statement provided by the embodiment of the present invention can be applied in the process of batch querying a data warehouse by a big data query system, wherein the data warehouse can be composed of one or more operands. The query statement optimization method provided by the embodiment of the present invention is specifically an optimization method between query statements.
[0110] In the embodiment of the present invention, in one optimization process, n query statements are used as basic units, and the ...
Embodiment 2
[0158] In this embodiment, an optimization process is taken as an example to illustrate the method for optimizing a query statement provided in Embodiment 1. For an explanation of relevant content in this embodiment, reference may be made to Embodiment 1. The "first type of optimization method" in Embodiment 1 is: in this embodiment, operators whose corresponding operands have the same version number, have fixed value-reference relationship, and belong to different logical query trees are established Precursor-successor relationship; the "second type of optimization method" in the first embodiment in this embodiment is: combining two logical query trees into one logical query tree through a common subtree. The execution subject of this embodiment is a big data query system.
[0159] Such as Image 6 As shown, the optimization method of the query statement provided in this embodiment includes the following steps:
[0160] 601. Receive n query statements, where n≥2, and n is a...
Embodiment 3
[0215] The embodiment of the present invention provides a query optimization device 150 for executing figure 1 The optimization method of the query statement shown, such as Figure 15 As shown, the optimization device 150 of the query statement includes:
[0216] A receiving unit 1501, configured to receive n query statements; wherein, n≥2, n is an integer;
[0217] A generating unit 1502, configured to generate n logical query trees from the n query statements;
[0218] Execution unit 1503, configured to add version numbers to operands corresponding to operators in the n logical query trees according to preset rules; wherein, the preset rules include: different version numbers of different operands, each operator The version numbers of the operands of the second specified value are different, and the version numbers of the same operands corresponding to the operators in different operator groups are different; a group obtained by grouping operators in the n logical query t...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com