US 12,461,915 B1
Reducing activity of the main SQL executor thread
Christina Teflioudi, Heidelberg (DE); Paul Willems, Heidelberg (DE); and Marius Eich, Neustadt (DE)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Aug. 27, 2024, as Appl. No. 18/817,079.
Int. Cl. G06F 15/16 (2006.01); G06F 16/2453 (2019.01); G06F 16/2458 (2019.01)
CPC G06F 16/24545 (2019.01) [G06F 16/24532 (2019.01); G06F 16/2471 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method comprising:
generating, by a database execution engine, a first query execution plan in response to receiving a first query, wherein a thread limit is specified for worker threads launched by the database execution engine;
launching a first main executor thread to process the first query;
creating a first plurality of tasks to be performed in response to the first query;
launching a first plurality of worker threads to perform the first plurality of tasks, wherein the first plurality of worker threads is less than or equal to the thread limit;
in response to parallelizing processing of the first query execution plan, restricting the first main executor thread to a first period of execution time before the first main executor thread is forced to enter a waiting phase;
waking up the first main executor thread after the first plurality of worker threads have finished performing the first plurality of tasks; and
closing, by the first main executor thread, the first query in response to execution of the first query execution plan being completed.