Skip to main content

An efficient algorithm for solving the partial sum query problem

01 September 2001

New Image

We address the problem: given n data values, how many partial sums must be stored so that partial sums of any other combination of these n values can be calculated in one arithmetic operation from the stored values. This problem has application in online analytical processing (OLAP) databases {[}Gray et al., Proc. 12th Int. Conf. Data Eng. (1996)] where it is called the partial sum aggregation query. It can also be used to generate the entire power set of n values efficiently. In this paper, we derive lower bounds for this problem, devise an efficient algorithm to solve it and show that our heuristic comes reasonably close to the lower bound. (C) 2001 Elsevier Science Inc. All rights reserved.