Tenant-Aware Query Warmup for Cloud Database Upgrades

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database upgrades often lead to significant performance degradation due to the invalidation of query execution plans, resulting in slow query processing times, especially in multi-tenant environments, where each tenant experiences downtime and increased computing resource overhead.

Innovation Solution

The implementation of 'query warmup' techniques, where anticipated database queries are recorded and replayed after an upgrade, generating new query execution plans that are stored in the cache, thereby reducing the need for recalculating plans during actual user queries and improving performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If database upgrade is performed, then system functionality is improved, but query execution time increases significantly

Engineering Contradiction:
Improvesystem functionalityVSAvoidquery execution time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by executing query warmup operations after database upgrade but before actual user queries. The system identifies frequently executed queries and pre-generates their execution plans, storing them in the query execution plan cache. This preliminary preparation ensures that when users actually execute queries, the optimized plans are already available, thus preventing the time loss that would otherwise occur from generating plans on-demand during user operations.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If query execution plans are recalculated after upgrade, then query optimization is achieved, but computing resource overhead increases

Engineering Contradiction:
Improvequery optimizationVSAvoidcomputing resource overhead
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent applies partial action by selectively generating execution plans only for frequently executed queries identified through query logging and analysis, rather than recalculating plans for all possible queries. The system monitors query execution patterns, identifies the most common queries, and pre-generates plans only for those specific queries. This partial approach achieves sufficient query optimization for the majority of user operations while avoiding the excessive computing resource overhead that would result from comprehensive plan recalculation for all queries.

Inventive Principle:
Principle #16Partial or excessive action

3Adaptability or versatility

If multi-tenant environment is supported, then system versatility is improved, but performance consistency across tenants deteriorates

Engineering Contradiction:
Improvemulti-tenant supportVSAvoidperformance consistency
Core Design Contradiction:
Adaptability or versatilityVSStability of the object's composition

Solution Approach 1:

The patent applies segmentation by implementing tenant-isolated query execution plan caches in multi-tenant database environments. Each tenant has a separate cache that stores pre-generated execution plans specific to their data and access patterns. The query warmup process is also segmented to run independently for each tenant, identifying and pre-generating plans based on tenant-specific query logs. This segmentation ensures that performance optimization for one tenant does not interfere with another, maintaining performance consistency across all tenants while still supporting multi-tenant versatility.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP4485221A1Tenant-aware query warmup in cloud application programming model
Publication Date: 2025.01.01 SAP SE
  • EP4485221A1 patent drawingFigure 1
  • EP4485221A1 patent drawingFigure 2
  • EP4485221A1 patent drawingFigure 3

AI summary

Database performance can suffer due to invalidation of query execution plans that takes place as part of an upgrade. Database queries can be recorded and replayed after invalidation of the query execution plans. Replaying the recorded queries after invalidation results in generation of a new query execution plan that can then be used when the query is executed again, resulting in improved performance from a user perspective. Other features, including multi-tenant support can be implemented.