Application-Aware Database Query Flow Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvestartup timeVSAvoiddatabase structure complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

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.

Inventive Principle:
Principle #10Preliminary action

2Speed

If the database pre-parses and caches queries using application metadata, then query execution speed is improved, but the database complexity increases

Engineering Contradiction:
Improvequery execution speedVSAvoiddatabase system complexity
Core Design Contradiction:
SpeedVSDevice complexity

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvescaling capabilityVSAvoidquery optimization complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

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.

Inventive Principle:
Principle #5Merging (Combining)

4Productivity

If the database is application-aware with query-flow optimization, then the operational efficiency is improved, but the difficulty of implementation increases

Engineering Contradiction:
Improveoperational efficiencyVSAvoidimplementation ease
Core Design Contradiction:
ProductivityVSEase of manufacture

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11249995B2Techniques and architectures for providing and operating an application-aware database environment with predictive execution of queries and query flows
Publication Date: 2022.02.15 SALESFORCE INC
  • US11249995B2 patent drawing
  • US11249995B2 patent drawing
  • US11249995B2 patent drawing

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.