Graph Database Query Planning with Intermediate Deduplication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The efficiency of querying data in graph databases is low.
Innovation Solution
A data query method that involves generating an execution plan based on a user's query statement, determining the execution order of query operations, identifying a target operation other than the last operation, and performing deduplication on duplicate results to optimize the query process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional query methods are used in graph databases, then the query process is simple, but the data query efficiency is low
Solution Approach 1:
The system performs preliminary actions by determining the execution order of query operations before actually executing them. The optimization module analyzes the query plan in advance, identifies target operations that produce duplicate results, and inserts deduplication operations at appropriate positions before execution, thereby improving query efficiency without adding significant runtime complexity
Solution Approach 2:
The optimization module acts as an intermediary between the query parser and the execution engine. It receives the query plan, analyzes it to identify operations requiring deduplication, inserts optimization operations, and then passes the optimized plan to the execution engine, thereby resolving the contradiction between simplicity and efficiency
2Manufacturing precision
If deduplication operations are inserted into the execution plan, then duplicate results are eliminated, but the execution plan becomes more complex
Solution Approach 1:
The system applies local quality by inserting deduplication operations only at specific locations in the execution plan where duplicate results are generated, rather than applying deduplication universally. The optimization module identifies target operations and inserts deduplication operations at precise positions, thereby ensuring result accuracy while minimizing the increase in execution plan complexity
Data Source
AI summary
This specification discloses data query methods and apparatuses, storage media, and electronic devices. In an example method, a query statement input by a user is obtained, where the query statement is used to query data from a database. Based on the query statement, an execution plan corresponding to the query statement is generated. Based on the execution plan, each query operation involved in the execution plan and an execution order of query operations are; determined. A target operation from the query operations is determined based on the execution order of the query operations, where the target operation is an operation other than a last query operation to be executed among the query operations. When executing the execution plan, deduplication is performed on duplicate results included in query results obtained by executing the target operation. Based on deduplicated query results, query data corresponding to the query statement is obtained.


