Sparse Prefix Sums

  • Michael Shekelyan
  • Anton Dignös
  • Johann Gamper
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10509)


The prefix sum approach is a powerful technique to answer range-sum queries over multi-dimensional arrays in constant time by requiring only a few look-ups in an array of precomputed prefix sums. In this paper, we propose the sparse prefix sum approach that is based on relative prefix sums and exploits sparsity in the data to vastly reduce the storage costs for the prefix sums. The proposed approach has desirable theoretical properties and works well in practice. It is the first approach achieving constant query time with sub-linear update costs and storage costs for range-sum queries over sparse low-dimensional arrays. Experiments on real-world data sets show that the approach reduces storage costs by an order of magnitude with only a small overhead in query time, thus preserving microsecond-fast query answering.


  1. 1.
    Facebook Connectivity Lab, Center for International Earth Science Information Network - CIESIN - Columbia University 2016. High Resolution Settlement Layer (HRSL). Source imagery for HRSL \(\copyright \) 2016 DigitalGlobe. Accessed 01 Mar 2017
  2. 2.
    Agarwal, P.K., Erickson, J., et al.: Geometric range searching and its relatives. Contemp. Math. 223, 1–56 (1999)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Bengtsson, F., Chen, J.: Space-efficient range-sum queries in OLAP. In: Kambayashi, Y., Mohania, M., Wöß, W. (eds.) DaWaK 2004. LNCS, vol. 3181, pp. 87–96. Springer, Heidelberg (2004). doi: 10.1007/978-3-540-30076-2_9 CrossRefGoogle Scholar
  4. 4.
    Chan, C.Y., Ioannidis, Y.E.: Hierarchical prefix cubes for range-sum queries. In: VLDB, pp. 675–686 (1999)Google Scholar
  5. 5.
    Chazelle, B.: Filtering search: a new approach to query-answering. SIAM J. Comput. 15(3), 703–724 (1986)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    Chazelle, B.: A functional approach to data structures and its use in multidimensional searching. SIAM J. Comput. 17(3), 427–462 (1988)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Chun, S., Chung, C., Lee, S.: Space-efficient cubes for OLAP range-sum queries. Decis. Support Syst. 37(1), 83–102 (2004)CrossRefGoogle Scholar
  8. 8.
    de Berg, M., van Kreveld, M., Overmars, M., Schwarzkopf, O.C.: Computational geometry. Computational Geometry, pp. 1–17. Springer, Heidelberg (2000). doi: 10.1007/978-3-662-04245-8_1 CrossRefGoogle Scholar
  9. 9.
    Geffner, S., Agrawal, D., Abbadi, A.: The dynamic data cube. In: Zaniolo, C., Lockemann, P.C., Scholl, M.H., Grust, T. (eds.) EDBT 2000. LNCS, vol. 1777, pp. 237–253. Springer, Heidelberg (2000). doi: 10.1007/3-540-46439-5_17 CrossRefGoogle Scholar
  10. 10.
    Geffner, S., Agrawal, D., El Abbadi, A., Smith, T.R.: Relative prefix sums: an efficient approach for querying dynamic OLAP data cubes. In: ICDE, pp. 328–335 (1999)Google Scholar
  11. 11.
    Ho, C., Agrawal, R., Megiddo, N., Srikant, R.: Range queries in OLAP data cubes. In: SIGMOD Conference, pp. 73–88 (1997)Google Scholar
  12. 12.
    Kang, H., Min, J., Chun, S., Chung, C.: A compression method for prefix-sum cubes. Inf. Process. Lett. 92(2), 99–105 (2004)CrossRefMATHGoogle Scholar
  13. 13.
    Liang, W., Wang, H., Orlowska, M.E.: Range queries in dynamic OLAP data cubes. Data Knowl. Eng. 34(1), 21–38 (2000)CrossRefMATHGoogle Scholar
  14. 14.
    Riedewald, M., Agrawal, D., El Abbadi, A.: pCUBE: update-efficient online aggregation with progressive feedback and error bounds. In: SSDBM, pp. 95–108 (2000)Google Scholar
  15. 15.
    Riedewald, M., Agrawal, D., El Abbadi, A.: Dynamic multidimensional data cubes. In: Multidimensional Databases, pp. 200–221 (2003)Google Scholar
  16. 16.
    Riedewald, M., Agrawal, D., Abbadi, A.E., Pajarola, R.: Space-efficient data cubes for dynamic environments. In: Kambayashi, Y., Mohania, M., Tjoa, A.M. (eds.) DaWaK 2000. LNCS, vol. 1874, pp. 24–33. Springer, Heidelberg (2000). doi: 10.1007/3-540-44466-1_3 CrossRefGoogle Scholar
  17. 17.
    Takaoka, T.: Efficient algorithms for the maximum subarray problem by distance matrix multiplication. Electr. Notes Theor. Comput. Sci. 61, 191–200 (2002)CrossRefMATHGoogle Scholar
  18. 18.
    Viola, P.A., Jones, M.J.: Rapid object detection using a boosted cascade of simple features. In: CVPR (1), pp. 511–518 (2001)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Michael Shekelyan
    • 1
  • Anton Dignös
    • 1
  • Johann Gamper
    • 1
  1. 1.Free University of Bozen-BolzanoBozenItaly

Personalised recommendations