Skip to main content

Efficient Exact Algorithm for Count Distinct Problem

  • Conference paper
  • First Online:
Computer Algebra in Scientific Computing (CASC 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11661))

Included in the following conference series:

  • 1022 Accesses

Abstract

This paper describes and analyses optimization approaches, which make possible the exact calculation of millions of hierarchical count distinct measures over hundreds of billions data rows. Described approach evolved for several years, in parallel with the growth of tasks from a fast growing internet company, and was finally implemented as a PEAPM (Pipelined Exact Accumulation for Paralleled Measures) algorithm. Current version of an algorithm outputs exact values (not estimates), works in a single thread, in minutes using a general commodity hardware, and requires volume of RAM equal to the doubled size of required measures.

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. Flajolet, P., Fusy, É., Gandouet, O., Meunier, F.: HyperLogLog: the analysis of a near-optimal cardinality estimation algorithm. In: Discrete Mathematics and Theoretical Computer Science Proceedings, Nancy, France, AH, pp. 127–146. CiteSeerX 10.1.1.76.4286

    Google Scholar 

  2. Wang, G., Zhang, X., Tang, S., Wilson, C., Zheng, H., Zhao, B.Y.: Clickstream user behavior models. ACM Trans. Web 11(4), 1–37 (2017)

    Article  Google Scholar 

  3. Banerjee, A., Ghosh, J.: Clickstream clustering using weighted longest common subsequences. In: Proceedings of Web Mining Workshop at the 1st SIAM Conference on Data Mining (2001)

    Google Scholar 

  4. Rönnbäck, L., Regardt, O., Bergholtz, M., Johannesson, P., Wohed, P.: Anchor modeling agile information modeling in evolving data environments. Data Knowl. Eng. 69(12), 1229–1253 (2010)

    Article  Google Scholar 

  5. Golov, N., Ronnback, L.: Big data normalization for massively parallel processing databases. Comput. Stand. Interfaces 54(2), 86–93 (2017). https://doi.org/10.1016/j.csi.2017.01.009

    Article  Google Scholar 

  6. Naspers takes full control of Russian classifieds site Avito in 1.16B dollars deal. https://techcrunch.com/2019/01/28/naspers-avito-1-16-billion/

  7. Benchmarks of modern analytical databases for typical click stream analysis scenarious. https://clickhouse.yandex/benchmark.html

  8. C++ Vertica extension implementing described algorithm. https://github.com/phil-88/vertica-udf

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sergey Bruskin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Golov, N., Filatov, A., Bruskin, S. (2019). Efficient Exact Algorithm for Count Distinct Problem. In: England, M., Koepf, W., Sadykov, T., Seiler, W., Vorozhtsov, E. (eds) Computer Algebra in Scientific Computing. CASC 2019. Lecture Notes in Computer Science(), vol 11661. Springer, Cham. https://doi.org/10.1007/978-3-030-26831-2_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-26831-2_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-26830-5

  • Online ISBN: 978-3-030-26831-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics