US 12,135,749 B2
Channel based flow control of data during execution of database queries
Adam Szymański, Warsaw (PL)
Assigned to OXLA SP. Z O.O., Warsaw (PL)
Filed by Oxla sp. z o.o., Warsaw (PL)
Filed on Aug. 11, 2022, as Appl. No. 17/886,445.
Claims priority of application No. 441869 (PL), filed on Jul. 28, 2022.
Prior Publication US 2024/0037151 A1, Feb. 1, 2024
Int. Cl. G06F 16/00 (2019.01); G06F 16/903 (2019.01); G06F 16/30 (2019.01)
CPC G06F 16/90335 (2019.01) 20 Claims
OG exemplary drawing
 
1. A computer-implemented method for executing database queries, the computer-implemented method comprising:
receiving, by a database system, a database query for processing data stored in one or more input tables;
generating an execution plan for executing the database query, the execution plan comprising a plurality of operators, wherein at least an operator receives data output by another operator or generates output provided as input to another operator;
allocating a set of threads for executing operators of the execution plan, each thread processing one or more operators, the set of threads comprising at least a first thread executing a first operator and a second thread executing a second operator, wherein the first thread communicates with the second thread via a blocking channel, the blocking channel comprising a buffer of fixed capacity for storing data; and
processing the database query by streaming data through the operators of the execution plan, wherein the first thread provides output of the first operator to the second operator of the second thread via the blocking channel, the processing comprising:
sending, by the first thread, data generated by the first operator to the second thread executing the second operator via the blocking channel if the buffer of the blocking channel has available capacity to store the data, and
blocking execution of the first thread if the buffer of the blocking channel is full, wherein execution of the first thread is blocked until the buffer of the blocking channel has capacity to store the data generated by the first operator.