IP Library Granted Patent US 12,585,652
Granted Patent B2
US 12,585,652 · App. 18/661,075 · Granted Mar 24, 2026

Automatic query performance regression management

Inventors: Jaehyok Chong (Seoul, KR); Sanghee Lee (Seoul, KR); Heesik Shin (Seoul, KR); Ki Hong Kim (Seoul, KR)
Assignee: SAP SE
G06F16/24545G06F11/3409G06F16/2456
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,585,652
App. No.
18/661,075
Granted
Mar 24, 2026
Kind
B2
Abstract

A computer implemented method can detect performance regression of executing a query using a current query plan. Responsive to detecting the performance regression, the method can automatically search for one or more candidate solutions for resolving the performance regression, and select, from the one or more candidate solutions, an effective solution that resolves the performance regression. The selecting includes evaluating performance of executing the query using one or more alternative query plans generated by the one or more candidate solutions. The method can store the effective solution for future execution of the query. The effective solution is configured to generate an updated query plan selected from the one or more alternative query plans. The updated query plan has better performance than the current query plan for executing the query. Related systems and software for implementing the method are also disclosed.

Claims (37)

1 . A computer-implemented method comprising:

detecting performance regression of executing a query using a current query plan;

responsive to detecting the performance regression, automatically searching for one or more candidate solutions for resolving the performance regression;

selecting, from the one or more candidate solutions identified responsive to detecting the performance regression, an effective solution that resolves the performance regression, wherein the selecting comprises automatically evaluating performance of executing the query using one or more alternative query plans generated by the one or more candidate solutions; and

storing the effective solution for future execution of the query, wherein the effective solution is configured to generate an updated query plan selected from the one or more alternative query plans, wherein the updated query plan has better performance than the current query plan for executing the query,

wherein detecting the performance regression comprises comparing one or more performance metrics of executing the query using the current query plan with corresponding performance metrics stored in an execution history,

wherein the one or more performance metrics comprise query execution time, wherein the performance regression is detected if the query execution time of executing the query using the current query plan is M times greater than an average of N most recent query execution times stored in the execution history, wherein M is predefined and greater than 1, and N is a predefined positive integer.

2 . The method of claim 1 , wherein the execution history stores one or more legacy query plans previously generated for the query, wherein the searching comprises identifying at least some of the legacy query plans stored in the execution history have better performance than the current query plan for executing the query.

3 . The method of claim 2 , wherein the one or more performance metrics comprise query execution time, wherein a candidate solution is identified if the query execution time corresponding to a selected legacy query plan stored in the execution history is smaller than the query execution time of executing the query using the current query plan, wherein the identified candidate solution specifies the selected legacy query plan as an alternative query plan.

4 . The method of claim 3 , wherein the effective solution specifies the updated query plan, wherein the query execution time of executing the query using the updated query plan is less than a predefined fraction of the query execution time of executing the query using the current query plan, wherein query objects included in the current query plan have identical object definitions as corresponding query objects included in the updated query plan.

5 . The method of claim 1 , wherein detecting the performance regression comprises identifying a predefined subtree pattern in a logical tree structure of the current query plan, wherein the logical tree structure defines relationship between a plurality of query operations.

6 . The method of claim 5 , wherein at least one of the candidate solutions specifies compiling the query with a query hint.

7 . The method of claim 5 , further comprising collecting runtime statistics for an operation involved in execution of the query using the current query plan, wherein at least one of the candidate solutions specifies compiling the query using the runtime statistics.

8 . The method of claim 1 , wherein detecting the performance regression comprises identifying the current query plan was generated with an insufficient plan enumeration, wherein at least one of the candidate solutions specifies compiling the query through an exhaustive plan enumeration.

9 . A computing system, comprising:

memory;

one or more hardware processors coupled to the memory; and

one or more computer readable storage media storing instructions that, when loaded into the memory, cause the one or more hardware processors to perform operations comprising:

detecting performance regression of executing a query using a current query plan;

responsive to detecting the performance regression, automatically searching for one or more candidate solutions for resolving the performance regression;

selecting, from the one or more candidate solutions identified responsive to detecting the performance regression, an effective solution that resolves the performance regression, wherein the selecting comprises automatically evaluating performance of executing the query using one or more alternative query plans generated by the one or more candidate solutions; and

storing the effective solution for future execution of the query, wherein the effective solution is configured to generate an updated query plan selected from the one or more alternative query plans, wherein the updated query plan has better performance than the current query plan for executing the query,

wherein detecting the performance regression comprises comparing one or more performance metrics of executing the query using the current query plan with corresponding performance metrics stored in an execution history,

wherein the one or more performance metrics comprise query execution time, wherein the performance regression is detected if the query execution time of executing the query using the current query plan is M times greater than an average of N most recent query execution times stored in the execution history, wherein M is predefined and greater than 1, and N is a predefined positive integer.

10 . The system of claim 9 , wherein the execution history stores one or more legacy query plans previously generated for the query, wherein the searching comprises identifying at least some of the legacy query plans stored in the execution history have better performance than the current query plan for executing the query.

11 . The system of claim 10 , wherein the one or more performance metrics comprise query execution time, wherein a candidate solution is identified if the query execution time corresponding to a selected legacy query plan stored in the execution history is smaller than the query execution time of executing the query using the current query plan, wherein the identified candidate solution specifies the selected legacy query plan as an alternative query plan.

12 . The system of claim 11 , wherein the effective solution specifies the updated query plan, wherein the query execution time of executing the query using the updated query plan is less than a predefined fraction of the query execution time of executing the query using the current query plan, wherein query objects included in the current query plan have identical object definitions as corresponding query objects included in the updated query plan.

13 . The system of claim 9 , wherein detecting the performance regression comprises identifying a predefined subtree pattern in a logical tree structure of the current query plan, wherein the logical tree structure defines relationship between a plurality of query operations.

14 . The system of claim 13 , wherein at least one of the candidate solutions specifies compiling the query with a query hint.

15 . The system of claim 14 , wherein the operations further comprise collecting runtime statistics for an operation involved in execution of the query using the current query plan, wherein at least one of the candidate solutions specifies compiling the query using the runtime statistics.

16 . One or more non-transitory computer-readable media having encoded thereon computer-executable instructions causing one or more processors to perform a method comprising:

detecting performance regression of executing a query using a current query plan;

responsive to detecting the performance regression, automatically searching for one or more candidate solutions for resolving the performance regression;

selecting, from the one or more candidate solutions identified responsive to detecting the performance regression, an effective solution that resolves the performance regression, wherein the selecting comprises automatically evaluating performance of executing the query using one or more alternative query plans generated by the one or more candidate solutions; and

storing the effective solution for future execution of the query, wherein the effective solution is configured to generate an updated query plan selected from the one or more alternative query plans, wherein the updated query plan has better performance than the current query plan for executing the query,

wherein detecting the performance regression comprises comparing one or more performance metrics of executing the query using the current query plan with corresponding performance metrics stored in an execution history,

wherein the one or more performance metrics comprise query execution time, wherein the performance regression is detected if the query execution time of executing the query using the current query plan is M times greater than an average of N most recent query execution times stored in the execution history, wherein M is predefined and greater than 1, and N is a predefined positive integer.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 22, 2025
From: CHONG, JAEHYOK; LEE, SANGHEE; SHIN, HEESIK; KIM, KI HONG
To: SAP SE
Reel/Frame 073287/0036 →
Continuity (1)
Related Publication 20250348491A1 · Nov 13, 2025
References Cited (29)
US 10802944B2 · Toal et al. · 2020 [cited by applicant]
US 11554263B2 · Hwang et al. · 2023 [cited by applicant]
US 11556538B2 · Bok et al. · 2023 [cited by applicant]
US 11734116B1 · Bunescu · 2023 [cited by applicant]
US 11748349B2 · Chang et al. · 2023 [cited by applicant]
US 11803545B1 · Chong · 2023 [cited by applicant]
US 11907217B2 · Bok et al. · 2024 [cited by applicant]
US 12001432B1 · Burger · 2024 [cited by applicant]
US 20090106321A1 · Das · 2009 [cited by applicant]
US 20120084315A1 · Schneider · 2012 [cited by applicant]
US 20120130986A1 · Abdellatif · 2012 [cited by examiner]
US 20140310249A1 · Kowalski · 2014 [cited by applicant]
US 20140317088A1 · Al-Omari · 2014 [cited by examiner]
US 20150186253A1 · Abraham · 2015 [cited by examiner]
US 20170147639A1 · Lee · 2017 [cited by applicant]
US 20190095470A1 · Dundjerski · 2019 [cited by examiner]
US 20200311074A1 · Lee · 2020 [cited by applicant]
US 20210303571A1 · Chang et al. · 2021 [cited by applicant]
US 20210357407A1 · Bok et al. · 2021 [cited by applicant]
US 20230048513A1 · Gao · 2023 [cited by applicant]
US 20240054127A1 · Chakkappen · 2024 [cited by examiner]
US 20240126607A1 · Royal et al. · 2024 [cited by applicant]
US 20240330370A1 · Schilders · 2024 [cited by applicant]
US 20250077515A1 · Sun · 2025 [cited by applicant]
Jung et al. (APOLLO: “Automatic Detection and Diagnosis of Performance Regressions in Database Systemsâ”) (Year: 2019). [cited by examiner]
Klemm, “SAP IBP on SAP HANA Cloud—a Paradigm Shift for Cloud Innovation,” https://community.sap.com/t5/supply-chain-management-blogs-by-sap/sap-ibp-on-sap-hana-cloud-a-paradigm-shift-for-cloud-innovation/ba-p/13549621, … [cited by applicant]
“SAP Hana Troubleshooting and Performance Analysis Guide,” https://help.sap.com/docs/SAP_HANA_PLATFORM/bed8c14f9f024763b0777aa72b5436f6?local3=en-US&state=PRODUCTION&version=2.0.07, 6 pages (accessed Mar. 14, 2024). [cited by applicant]
Owen, “Time Series Anomaly Detection: Simple Yet Powerful Approaches,” https://medium.com/bukalapak-data/time-series-anomaly-detection-simple-yet-powerful-approaches-4449ff31ca12, 30 pages (accessed Mar. 6, 2024). [cited by applicant]
Extended European Search Report, European Application No. 24213792.5, 8 pages, May 7, 2025. [cited by applicant]