Supercharge Your Innovation With Domain-Expert AI Agents!

Semi-join query method, device, server and storage medium

A query method and semi-join technology, applied in the computer field, can solve the problems of query bottleneck, complexity and low query efficiency in the calculation process

Active Publication Date: 2021-01-26
SHANGHAI DAMENG DATABASE
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] When the right node has a large number of connections, the right node is calculated first, and then the matching record with the left node is searched in the calculation result of the right node. The calculation amount is very large, and the query efficiency is very low.
In addition, if the calculation of the connection in the right node itself is very complicated, then the calculation process is also the bottleneck of the query

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
  • Semi-join query method, device, server and storage medium
  • Semi-join query method, device, server and storage medium
  • Semi-join query method, device, server and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] figure 1 It is a flowchart of a semi-join query method provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of querying the left node and right node of a semi-join to obtain query results. The method can be executed by a semi-join query device , the device can be realized by software and / or hardware, and the device is integrated in the server. Specifically, the method includes the following steps:

[0045] S110. Parse the semi-join query statement to generate an execution plan tree corresponding to the connection of the right node, where the semi-join query statement is used to query the left node and the right node of the semi-join.

[0046] The right node of the semi-join can be a data table or a connection. When the right node is a data table, the corresponding semi-join query statement can be in the form of SELECT A.C1,A.C2FROM AWHERE A.C1IN In this form of (SELECTB.D1FROM B), data table A is the left node of the semi-join, a...

Embodiment 2

[0063] Figure 4 The flow chart of a semi-join query method provided by Embodiment 2 of the present invention is embodied on the basis of the above embodiments. Specifically, the method includes the following steps:

[0064] S210. Parse the semi-join query statement to generate an execution plan tree corresponding to the connection of the right node, where the semi-join query statement is used to query the left node and the right node of the semi-join.

[0065] S220. Whether the semi-join mode of the left node and the right node is a preset mode and the query form of the right node is a preset mode, if yes, perform S230, otherwise, perform S270.

[0066] S230. Traverse the execution plan tree, and obtain leaf nodes and connection conditions of internal connections in the execution plan tree.

[0067] During the traversal process, the traversed leaf nodes are stored in the leaf node linked list, and the connection conditions are stored in the connection condition linked list f...

Embodiment 3

[0089] Figure 5A structural diagram of a semi-join query device provided by Embodiment 3 of the present invention. The device can execute the semi-join query method described in any of the above embodiments. Specifically, the device includes:

[0090] The parsing module 310 is used to parse the semi-join query statement to generate an execution plan tree corresponding to the connection of the right node, and the semi-join query statement is used to query the left node and the right node of the semi-join;

[0091] The determining module 320 is configured to: if the semi-join mode between the left node and the right node is a preset mode and the query form of the right node is a preset form, according to the leaf nodes and the inner links in the execution plan tree A connection condition, determining an independent leaf node set and a connection condition corresponding to the independent leaf node set;

[0092] The query module 330 is configured to query the left node and the ...

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 semi-join query method, device, server and storage medium. The method includes: parsing the semi-join query statement, generating an execution plan tree corresponding to the connection of the right node, the semi-join query statement is used to query the left node and the right node of the semi-join, if the semi-join mode between the left node and the right node is preset method and the query form of the right node is the preset form, then according to the leaf nodes and connection conditions of the inner connection in the execution plan tree, determine the independent leaf node set and the connection condition corresponding to the independent leaf node set, according to the independent leaf node set and independent The connection condition corresponding to the leaf node set queries the left node and right node of the semi-join, and obtains the query result. In the above technical solution, by determining the set of independent leaf nodes, searching for matching records with the left node in the set of independent leaf nodes of the right node does not need to calculate the right node, which improves the query efficiency of the semi-join.

Description

technical field [0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a semi-join query method, device, server and storage medium. Background technique [0002] Semi-join is a kind of database connection. For example, data table A is semi-joined with data table B. When a record in data table A finds a matching record in data table B, the record in data table A is returned instead of the data table. For records of B, even if multiple matching records are found in data table B, the record in data table A is only returned once. Among them, data table A is called the left node of the semi-join, and data table B is called the right node of the semi-join. node. In Structured Query Language (SQL), semi-joins usually use keywords IN or EXISTS as connection conditions, such as the SQL statement SELECT A.C1, A.C2FROM A WHERE A.C1IN (SELECT B.D1FROM B) is a semi-join. [0003] The right node of the semi-join can be not only ...

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/2455
Inventor 张钦朱仲颖
Owner SHANGHAI DAMENG DATABASE
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More