Skip to main content

AQapprox: Aggregation Queries Approximation with Distribution-Aware Online Sampling

  • Conference paper
  • First Online:
Web Information Systems Engineering – WISE 2020 (WISE 2020)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 12343))

Included in the following conference series:

  • 1110 Accesses

Abstract

Approximate query processing (AQP) is an effective way to provide approximate results for SQL queries, which relaxing accuracy in exchange for higher processing speed. In sampling-based AQP techniques, random sampling works well for uniformly distributed data but performs poorly on skewed data. To address this problem, we propose a distribution-aware approximation framework called AQapprox (aggregation queries approximation), to approximate queries more efficiently and accurately by extending Sapprox. We construct a probabilistic Map, which records the occurrences of sub-datasets on categorical columns and related statistics on numerical columns at each segment of the whole dataset. When a query arrives, AQapprox will combine Map and adaptively use different sampling methods based on the distribution. Experimental results on both real and synthetic datasets show that AQapprox can achieve a speedup by up to 5.9\(\times \) for skewed data, 64\(\times \) for uniform data over Sapprox, and has higher accuracy on multi-column queries.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Amazon review data. http://jmcauley.ucsd.edu/data/amazon/

  2. Tpc-h benchmark. http://www.tpc.org/tpch/

  3. Agarwal, S., Mozafari, B., Panda, A., Milner, H., Madden, S., Stoica, I.: BlinkDB: queries with bounded errors and bounded response times on very large data. In: Proceedings of the 8th ACM European Conference on Computer Systems, pp. 29–42 (2013)

    Google Scholar 

  4. Chaudhuri, S., Ding, B., Kandula, S.: Approximate query processing: no silver bullet. In: Proceedings of the 2017 ACM International Conference on Management of Data, pp. 511–519 (2017)

    Google Scholar 

  5. Ding, B., Huang, S., Chaudhuri, S., Chakrabarti, K., Wang, C.: Sample+seek: approximating aggregates with distribution precision guarantee. In: Proceedings of the 2016 International Conference on Management of Data, pp. 679–694 (2016)

    Google Scholar 

  6. Gan, Y., Meng, X., Shi, Y.: Processing online aggregation on skewed data in mapreduce. In: Proceedings of the Fifth International Workshop on Cloud Data Management, pp. 3–10 (2013)

    Google Scholar 

  7. Gemulla, R., Lehner, W., Haas, P.J.: Maintaining bounded-size sample synopses of evolving datasets. VLDB J. 17(2), 173–201 (2008)

    Article  Google Scholar 

  8. Goiri, I., Bianchini, R., Nagarakatte, S., Nguyen, T.D.: ApproxHadoop: bringing approximations to mapreduce frameworks. In: Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 383–397 (2015)

    Google Scholar 

  9. Gretton, A., Borgwardt, K.M., Rasch, M.J., Schölkopf, B., Smola, A.: A kernel two-sample test. J. Mach. Learn. Res. 13, 723–773 (2012)

    Google Scholar 

  10. Haas, P.J., König, C.: A bi-level bernoulli scheme for database sampling. In: Proceedings of the 2004 ACM SIGMOD International Conference on Management of Data, pp. 275–286 (2004)

    Google Scholar 

  11. Kandula, S., et al.: Quickr: lazily approximating complex AdHoc queries in bigdata clusters. In: Proceedings of the 2016 International Conference on Management of Data, pp. 631–646 (2016)

    Google Scholar 

  12. Li, K., Zhang, Y., Li, G., Tao, W., Yan, Y.: Bounded approximate query processing. IEEE Trans. Knowl. Data Eng. 12, 2262–2276 (2019). https://doi.org/10.1109/TKDE.2018.2877362

    Article  Google Scholar 

  13. Lohr, S.L.: Sampling: Design and Analysis. Nelson Education (2009)

    Google Scholar 

  14. Marwick, B., Krishnamoorthy, K.: cvequality: tests for the equality of coefficients of variation from multiple groups. R software package version, vol. 1, p. 3 (2018)

    Google Scholar 

  15. Pansare, N., Borkar, V.R., Jermaine, C., Condie, T.: Online aggregation for large mapreduce jobs. Proc. VLDB Endowment 4(11), 1135–1145 (2011)

    Article  Google Scholar 

  16. Park, Y., Mozafari, B., Sorenson, J., Wang, J.: VerdictDB: universalizing approximate query processing. In: Proceedings of the 2018 International Conference on Management of Data, pp. 1461–1476 (2018)

    Google Scholar 

  17. Wiegand, H.: Kish, l.: Survey Sampling. Wiley, New York (1965). ix + 643 s., 31 abb., 56 tab., preis 83 s. 10(1), 88–89 (2010)

    Google Scholar 

  18. Zhang, X., Wang, J., Yin, J.: Sapprox: enabling efficient and accurate approximations on sub-datasets with distribution-aware online sampling. Proc. VLDB Endowment 10(3), 109–120 (2016)

    Article  Google Scholar 

Download references

Acknowledgments

This work was supported by NSFC grants (No. 61532021 and 61972155), Shanghai Knowledge Service Platform Project (No. ZF1213).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xingjian Lu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Wu, H., Wang, X., Lu, X. (2020). AQapprox: Aggregation Queries Approximation with Distribution-Aware Online Sampling. In: Huang, Z., Beek, W., Wang, H., Zhou, R., Zhang, Y. (eds) Web Information Systems Engineering – WISE 2020. WISE 2020. Lecture Notes in Computer Science(), vol 12343. Springer, Cham. https://doi.org/10.1007/978-3-030-62008-0_28

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-62008-0_28

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-62007-3

  • Online ISBN: 978-3-030-62008-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics