| CPC G06F 16/24542 (2019.01) [G06F 16/24537 (2019.01)] | 20 Claims |

|
1. A system comprising:
at least one hardware processor;
a non-transitory computer-readable medium storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising:
receiving a database command, the database command comprising a first operator, a join operator, and a clause, the clause limiting a number of elements output by the first operator, the first operator having input that is affected by results of the join operator;
generating a query plan for the database command, the query plan comprising:
a first query node corresponding to the first operator placed higher up in a pipeline than a second query node corresponding to the join operator;
a third query node corresponding to the clause, the third query node defining a dynamic variable having a value based on elements in a data structure utilized by the first query node;
a fourth query node placed lower in the pipeline than the second query node, the fourth query node defining a filter based on the dynamic variable; and
executing the query plan by passing one element at a time up the pipeline starting from a lowest query node in the pipeline, such that, upon the data structure reaching a size defined by the clause, the filter in the fourth query node is activated to prevent one or more subsequently passed elements from being passed to the second query node.
|