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

Distributed database query method and device

A query method and a query device technology, applied in the database field, can solve problems such as low execution efficiency and slow speed, and achieve the effects of reducing pressure, reducing data movement, and shortening the time consumed by aggregation

Pending Publication Date: 2020-10-02
北京人大金仓信息技术股份有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, the existing aggregation methods need to move a large amount of data between nodes during execution, resulting in low execution efficiency and slow speed

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
  • Distributed database query method and device
  • Distributed database query method and device
  • Distributed database query method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] An embodiment of the present disclosure provides a query method for a distributed database, where the distributed database includes a master node and multiple computing nodes connected to the master node. refer to figure 1 The flow chart of the query method of the distributed database shown in this method is applied to the computing node, and may include the following steps:

[0036] Step S102, receiving a query plan containing multi-stage aggregation operations sent by the master node; wherein, the query plan is generated by the master node based on the query request of the client;

[0037] Step S104, in the process of executing the query plan, obtain the original data to be aggregated, and perform a multi-stage aggregation operation on the original data to obtain the target aggregated data; wherein, the multi-stage aggregation operation means performing at least one aggregation operation on the original data;

[0038] Step S106, sending the target aggregation data to...

Embodiment 2

[0057] In another embodiment, a method for querying a distributed database is also provided. The database includes a master node and a plurality of computing nodes connected to the master node. The method is applied to the master node and may include the following steps:

[0058] Step 1, generate a query plan containing multi-stage aggregation operations based on the received query request from the client;

[0059] Step 2: Send the query plan to each computing node, so that each computing node obtains the original data to be aggregated during the execution of the query plan, and performs multi-stage aggregation operations on the original data to obtain the target aggregated data; among them, A multi-stage aggregation operation means performing at least one aggregation operation on the original data;

[0060] Step 3: Receive the target aggregation data sent by each computing node, and obtain query results based on each target aggregation data.

[0061] In the query method of t...

Embodiment 3

[0069] refer to Figure 5As shown in the flow chart of another distributed database query method, the distributed database query method provided by the embodiment of the present disclosure mainly includes the following steps:

[0070] Step 1), the client sends a SQL request to the distributed database.

[0071] Step 2), performing lexical analysis and syntax analysis on the SQL request to generate a syntax tree.

[0072] Step 3), preprocessing the syntax tree to determine whether to distribute the syntax tree; if yes, then perform the following step 4); if not, then execute utility commands, such as DDL, etc.

[0073] Step 4), perform semantic analysis and query rewriting (such as selection, insertion, update, deletion) on the syntax tree to generate a query tree.

[0074] Step 5), the optimizer processes the query tree to generate a query plan containing multi-stage aggregation operations.

[0075] Step 6), the executor of the computing node executes the query plan to retu...

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 distributed database query method and device, and relates to the technical field of databases. The method comprises: enabling each calculation node to receive a query plan which is sent by a main node and contains multi-stage aggregation operation, wherein the query plan is generated by the main node based on a query request of the client; in the process of executing the query plan by the computing node, obtaining to-be-aggregated original data, and executing multi-stage aggregation operation on the original data to obtain target aggregation data, wherein the multi-stage aggregation operation indicates that at least one aggregation operation is executed on the original data; and sending the target aggregation data to the main node, so that the main node obtains a query result based on the target aggregation data of each computing node. According to the invention, the speed and efficiency of aggregation query can be improved in performance.

Description

technical field [0001] The present disclosure relates to the technical field of databases, in particular to a query method and device for a distributed database. Background technique [0002] With the development of Internet technology, the amount of data has increased sharply. There are more and more scenarios where various industries use shared-nothing distributed database clusters to store data, and many scenarios require analysis of large amounts of data. Therefore, query performance is a measure of distributed An important indicator of the database. [0003] The aggregation operation in the query is very important in the processing of the database, especially in scenarios such as business reports, statistical analysis, and data mining. The aggregation operation usually involves a large amount of data or a large amount of calculation, and the execution time is long. Therefore, the aggregation query It directly affects the execution efficiency and response speed of the d...

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/2453G06F16/2458G06F16/27
CPCG06F16/24542G06F16/24549G06F16/2471G06F16/27
Inventor 王鸿翔史跃飞
Owner 北京人大金仓信息技术股份有限公司