Distributed Query Expression Execution via Native Functions
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing systems face inefficiencies in executing query specifications across multiple databases, particularly when the cost of processing expressions on one computing device exceeds a threshold, leading to suboptimal performance in memory, bandwidth, and CPU cycles.
Innovation Solution
A method and system that evaluate query specifications to identify candidate expressions, determine a cost estimate, and replace them with native query functions when the cost exceeds a threshold, executing these functions on the data source device while generating necessary context parameters.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If expressions in query specifications are executed at the first computing device (query processing device), then query execution flexibility and control are improved, but memory requirements, bandwidth consumption, and CPU cycle usage increase significantly
Solution Approach 1:
The patent extracts computationally expensive expression execution from the first computing device (query processing device) and relocates it to the second computing device (data source device). This extraction principle resolves the contradiction by removing the burden of heavy computation from the query processing device, thereby reducing its memory requirements while maintaining execution control through the native query function mechanism.
Solution Approach 2:
The patent introduces a new dimension of execution location by enabling expression execution at the data source device rather than only at the query processing device. This dimensional shift in where computation occurs allows the system to reduce memory requirements at the query processing device while still achieving query execution goals through distributed computation.
2Productivity
If expressions in query specifications are executed at the first computing device, then query processing capability is improved, but bandwidth consumption for transferring result sets increases
Solution Approach 1:
The patent extracts large result sets from being fully transferred to the first computing device by instead executing native query functions at the data source device. This extraction reduces the volume of data that needs to be transferred over the network, thereby reducing bandwidth consumption while maintaining query processing capability through the distributed execution model.
3Adaptability or versatility
If expressions in query specifications are executed at the first computing device, then query flexibility is improved, but CPU cycle requirements increase
Solution Approach 1:
The patent extracts intensive expression evaluation from the first computing device and performs it at the data source device using native query functions. This extraction reduces CPU cycle usage at the query processing device while maintaining query flexibility because the system can still dynamically generate and execute different query specifications through the native function interface.
4Quantity of substance
If native query functions are executed at the second computing device (data source device), then memory, bandwidth, and CPU cycle requirements at the first device are reduced, but query execution complexity increases
Solution Approach 1:
The patent introduces native query functions as intermediaries between the query processing device and the data source device. These intermediary functions handle the complexity of distributed execution, translation between query languages, and coordination of operations, thereby reducing the apparent complexity at the query processing device while enabling efficient distributed execution that reduces memory requirements.
Data Source
AI summary
A computer-implemented method for executing a query specification can include evaluating the query specification by a first computing device to identify a candidate expression in the query specification to be executed by a second computing device hosting a source of data specified in the candidate expression. A cost estimate for executing the candidate expression at the first computing device is determined. Whether the cost estimate of executing the candidate expression at the first computing device is greater than a threshold is determined. The candidate expression is replaced with a native query function when the cost estimate of executing the candidate expression at the first computing device is greater than the threshold. The native query function can be executed at the second computing device. It can be determined whether a runtime context is necessary, and if necessary, a context parameter is injected into the native query function.


