RDBMS Query Price Estimation via EXPLAIN Modifier
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Cloud-based database customers face challenges in predicting and optimizing costs for as-a-service query prices due to the complexity of resource usage and lack of robust estimation tools, leading to potential high charges for experimental queries and inadequate cost efficiency.
Innovation Solution
Integrating an EXPLAIN modifier into query execution plans within a relational database management system (RDBMS) to compute cost estimates from resource usage categories using cost models, generating price estimates through configurable pricing formulas, and offering a price guarantee for selected queries, allowing for 'what-if' pricing scenarios.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If consumption-based pricing is implemented, then pricing flexibility is improved, but query cost predictability deteriorates
Solution Approach 1:
The system performs preliminary cost estimation by analyzing query execution plans before actual query execution. The optimizer calculates estimated resource usage (CPU, memory, I/O) and translates this into cost predictions using configurable pricing formulas, allowing customers to know expected charges beforehand without committing to payment yet
2Reliability
If robust query price estimation is provided, then customer cost confidence is improved, but system complexity increases
Solution Approach 1:
The cost estimation functionality is merged with the existing query optimizer and EXPLAIN infrastructure. The same cost models used for query optimization are reused for pricing estimation, and the EXPLAIN modifier leverages existing execution plan analysis, avoiding duplication of complex estimation logic while providing reliable cost predictions
3Loss of information
If detailed cost breakdown is provided, then query optimization insight is improved, but information complexity increases
Solution Approach 1:
The cost information is segmented and presented at multiple levels of granularity. The system provides overall query cost estimates, breaks down costs by resource type (CPU, memory, I/O), and identifies specific execution plan steps contributing to costs. This segmented presentation makes detailed cost information digestible while maintaining comprehensive optimization insights
Data Source
AI summary
An apparatus, method and computer program product for estimating as-a-Service (aaS) query prices in a relational database management system (RDBMS). An optimizer of the RDBMS inserts an EXPLAIN modifier into a query, wherein the EXPLAIN modifier results in the optimizer generating a summary of a query execution plan for the query that includes one or more cost estimates for the RDBMS to perform the query. A price estimate for the query is then generated based on the cost estimates, wherein the price estimate is generated using one or more configurable pricing formulae. The price estimate is merged into the summary of the query execution plan for the query. Moreover, a price guarantee may be generated for the price estimate, wherein the price guarantee is honored when the query is subsequently invoked for execution by the RDBMS.


