Patent ID: 8856138

Claim:
A computer-implemented method comprising: generating, by a processor, a first level comprising a root node and lower levels below the first level comprising intermediate nodes of a hybrid range query data structure, the data structure representing a bitmap binary tree mapping a first set of values to a second set of values; determining, during the generating, that a quantity of bits in a next intermediate node in the bitmap binary tree is equal to a pre-specified number; generating, responsive to the determining, leaf nodes for the hybrid range query data structure instead of generating additional lower levels thereby eliminating lower levels, the leaf nodes storing values corresponding to the second set of values, wherein each leaf node has an associated node offset and no two values in a leaf node are equal; storing the hybrid range query data structure in a memory; and returning, in response to a range query including a range of first values in the first set of values, values in the second set of values determined from summation of values in leaf nodes that correspond to respective first values in the range of first values and respective node offsets.