Query optimization execution method and device
By using the method of sharing CTE result data in memory in SparkSQL's query execution plan, the shuffle overhead problem of CTE reference in the query statement is solved, which significantly improves query efficiency.
Patent Information
- Application Number
- CN202411754656.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the process of executing data queries using query tools such as SparkSQL, it is difficult for the prior art to effectively improve query efficiency, especially when there is a common expression CTE in the query statement, additional shuffle overhead is generated, affecting query performance.
In the physical execution plan of the query, a custom execution operator is generated for the subquery reference that references the common expression CTE, the data results of the CTE are stored in the memory cache, and memory sharing is performed between execution stages with the same CTE dependency, reducing disk I/O operations.
This method can significantly improve the execution performance of queries and improve the efficiency of data queries by reducing shuffle operations and disk I/O.
Smart Images

Figure CN119782343A_ABST
Abstract
Citation Information
Patent Citations
SQL (Structured Query Language) execution optimization method, device and equipment based on Trino common table expression
CN118132582A
Methods And Apparatus Of Shared Expression Evaluation Across RDBMS And Storage Layer
US20180144029A1
Query plan generation for queries having common expressions
US9501536B1
Query plan generation for common table expressions
US9589030B1
Cited By
Method for optimizing cte expression based on gbase8c distributed database
CN120448419A
A CTE expression optimization method based on gbase8c distributed database
CN120448419B