US 11,989,180 B2
Proactive query plan compilation
Jaehyok Chong, Seoul (KR); Won Jun Chang, Seoul (KR); and Youngbin Bok, Seoul (KR)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Oct. 17, 2022, as Appl. No. 17/967,623.
Prior Publication US 2024/0126753 A1, Apr. 18, 2024
Int. Cl. G06F 16/00 (2019.01); G06F 16/2453 (2019.01)
CPC G06F 16/24542 (2019.01) 20 Claims
OG exemplary drawing
 
1. One or more non-transitory computer-readable media storing computer-executable instructions that, when executed by a processor, perform a method for proactively compiling in-memory database management system (DBMS) query plans upon startup of the in-memory DBMS, the method comprising:
during normal operation of the in-memory DBMS:
capturing a plurality of alternative query execution plans;
collecting associated execution statistics for each of the plurality of alternative query execution plans;
selectively persisting the plurality of alternative query execution plans with the associated execution statistics to one or more persistent data stores;
in response to detecting one or more query execution performance regressions associated with a regressed query plan:
comparing the regressed query plan with one or more prior query plans; and
in response to determining that a candidate prior query plan of the one or more prior query plans performs better than the regressed query plan, replacing the regressed query plan with the candidate prior query plan; and
upon a restart of the in-memory DBMS:
loading a selected portion of the plurality of alternative query execution plans with the associated execution statistics from the one or more persistent data stores;
proactively compiling the selected portion of the plurality of alternative query execution plans;
receiving a plurality of received queries to be executed; and
executing the plurality of received queries based on the proactively compiled plurality of alternative query execution plans.