US 12,007,986 B2
Aggregation over high-cardinality dimensions using uniqueness indices
Frederik Transier, Heidelberg (DE); and Kai Stammerjohann, Wiesloch (DE)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Jun. 1, 2022, as Appl. No. 17/829,695.
Prior Publication US 2023/0394039 A1, Dec. 7, 2023
Int. Cl. G06F 17/00 (2019.01); G06F 16/22 (2019.01); G06F 16/242 (2019.01)
CPC G06F 16/244 (2019.01) [G06F 16/221 (2019.01); G06F 16/2255 (2019.01)] 17 Claims
OG exemplary drawing
 
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.