US 12,105,768 B2
Selectivity estimation of conjunctive predicates
Peter Lysakovski, Heidelberg (DE); Guido Moerkotte, Mannheim (DE); Norman May, Karlsruhe (DE); Diego Havenstein, Munich (DE); and Gabriele Steidl, Berlin (DE)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Jul. 9, 2020, as Appl. No. 16/924,455.
Prior Publication US 2022/0012302 A1, Jan. 13, 2022
Int. Cl. G06F 17/16 (2006.01); G06F 16/242 (2019.01); G06F 16/2453 (2019.01); G06F 17/11 (2006.01)
CPC G06F 17/16 (2013.01) [G06F 16/2428 (2019.01); G06F 16/24545 (2019.01); G06F 17/11 (2013.01)] 6 Claims
OG exemplary drawing
 
1. A system comprising:
a graphics processing unit including shared memory and a plurality of threads;
a memory storing processor-executable program code; and
a processing unit to execute the processor-executable program code in order to cause the system to:
determine a query comprising z predicates;
determine known selectivities of each of a set of conjuncts of the z predicates;
estimate selectivities of all conjuncts of the z predicates based on the known selectivities and a recursive determination of Cx, wherein the recursive determination comprises:
loading of x into the shared memory;
at a first iteration:
activation of a first half of the plurality of threads while a second half of the plurality of threads are idle; and
operation of each active thread to sum a respective two values of x stored in the shared memory and to store the result in the shared memory; and
at each one of a plurality of iterations after the first iteration:
activation of a respective first half of the plurality of threads while a second respective half of the plurality of threads are idle, wherein the first respective half of the plurality of threads and the second respective half of the plurality of threads are different for each of the first iteration and the plurality of iterations; and
operation of each active thread of the one of the plurality of iterations to sum a respective two results stored in the shared memory and to store the sum in the shared memory; and
determine a query execution plan associated with the query based on the estimated selectivities,
where x represents selectivities of all complete conjuncts of the z predicates and C is a complete design matrix

OG Complex Work Unit Math
having indices [0, 2z−1].