CPC G06F 16/244 (2019.01) [G06F 16/221 (2019.01); G06F 16/2255 (2019.01)] | 17 Claims |
1. A system comprising:
a storage system storing a plurality of database tables; and
a server to:
receive a query specifying one of the plurality of database tables, an aggregate function, a grouping column and an aggregation column; and
in response to the received query:
determine a uniqueness index associated with the grouping column, where each row of the uniqueness index corresponds to a row of the grouping column and indicates whether the value in the row of the grouping column is unique or not unique within the column;
determine whether a row of the uniqueness index corresponding to a first row of the grouping column indicates that a first value of the first row of the grouping column is unique in the grouping column;
if it is determined that the first value of the first row of the grouping column is unique in the grouping column, store a result set entry including the first value and an aggregation value determined based on a value of the aggregation column in the first row; and
if it is determined that the first value of the first row of the grouping column is not unique in the grouping column, determine a key based on the first value and perform a hash lookup using the key.
|