Application-Aware Database Query Flow Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current database management systems (DBMSs) are generic and not application-aware, leading to inefficient query processing and optimization, as they lack knowledge of applications, modules, or queries, resulting in prolonged startup times and suboptimal performance, especially in complex environments.
Innovation Solution
Implementing an application-aware database system that pre-parses and caches queries and query execution plans using metadata about applications, modules, and queries, allowing the database to optimize query flows and reduce hard parse times by pre-loading and persisting execution plans, even across multiple nodes in a multi-node environment.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If the database is generic and not application-aware, then the database structure is simple and easy to implement, but the startup time is prolonged and query optimization is inefficient
Solution Approach 1:
The database performs preliminary actions by pre-parsing and caching query execution plans during database startup, before any application queries are actually executed. The system identifies and pre-processes expected queries based on application metadata, storing their execution plans in advance so that when applications connect, the queries are already optimized and ready to execute, eliminating the need for time-consuming parse operations at runtime.
2Speed
If the database pre-parses and caches queries using application metadata, then query execution speed is improved, but the database complexity increases
Solution Approach 1:
The database performs preliminary actions by pre-parsing and caching query execution plans during database startup, before any application queries are actually executed. The system identifies and pre-processes expected queries based on application metadata, storing their execution plans in advance so that when applications connect, the queries are already optimized and ready to execute, eliminating the need for time-consuming parse operations at runtime.
Solution Approach 2:
The patent introduces an intermediary component that acts as a bridge between the application layer and the database engine. This intermediary captures application metadata, identifies expected query patterns, and prepares execution plans in advance. By inserting this intermediary layer, the system can perform query optimization work beforehand without burdening the core database engine or application servers during runtime, thus improving query speed while managing complexity through specialized intermediate processing.
3Adaptability or versatility
If the database optimizes single queries at a time, then the implementation is straightforward, but the system does not scale well in complex environments
Solution Approach 1:
The patent merges multiple individual query optimization processes into a unified batch processing approach. Instead of optimizing each query independently when it arrives, the system collects metadata about multiple expected queries from applications and optimizes them together in advance. This batch processing of query optimization allows the system to share common parsing logic, reuse execution plans across similar queries, and scale more effectively in complex environments with many applications and queries.
4Productivity
If the database is application-aware with query-flow optimization, then the operational efficiency is improved, but the difficulty of implementation increases
Solution Approach 1:
The patent introduces an intermediary component that acts as a bridge between the application layer and the database engine. This intermediary captures application metadata, identifies expected query patterns, and prepares execution plans in advance. By inserting this intermediary layer, the system can perform query optimization work beforehand without burdening the core database engine or application servers during runtime, thus improving query speed while managing complexity through specialized intermediate processing.
Data Source
AI summary
Predictive execution of query flows in an application aware database environment. A repository of previously received and registered database queries along with at least corresponding metadata having information about database query flows generating the database queries is maintained. Application metadata corresponding to a subsequent database query is received. The repository is checked to determine if the application metadata matches one of the previously received and registered database query flows. One or more queries corresponding to the query flow from the repository is/are retrieved if a match is determined. Execution of the retrieved one or more database queries is started prior to receiving the query from outside the repository.


