CPC G06F 16/24554 (2019.01) [G06F 16/23 (2019.01); G06F 16/24537 (2019.01); G06F 16/24542 (2019.01)] | 20 Claims |
1. A method comprising:
receiving a database statement that requests top K results related to a database object and that indicates (1) a first column, of the database object, by which to partition a result set of processing the database statement and (2) a second column, of the database object, by which to order the result set;
generating a temporary buffer that comprises a plurality of slots;
for each row of multiple rows in the database object:
identifying a first key value that is associated with a first value in the first column of said each row;
identifying a second key value that is associated with a second value in the second column of said each row;
identifying a slot in the temporary buffer based on the first key value and the second key value;
determining whether to update the slot in the temporary buffer based on the second key value and any key values already in the slot;
based on the temporary buffer, responding to the database statement;
wherein the method is performed by one or more computing devices.
|