phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ethan Wang (JIRA)" <>
Subject [jira] [Created] (PHOENIX-4160) research for a proper hash size set for APPROX_COUNT_DISTINCT
Date Tue, 05 Sep 2017 20:40:03 GMT
Ethan Wang created PHOENIX-4160:

             Summary: research for a proper hash size set for APPROX_COUNT_DISTINCT
                 Key: PHOENIX-4160
             Project: Phoenix
          Issue Type: Improvement
         Environment: [link title|]
            Reporter: Ethan Wang

Now after -PHOENIX-418- finishes, currently the hash size is hard coded as 25/16 bits by default
(a design we follow Apache Druid. discussion see CALCITE-1588). And now we want to study to
find a proper size. 

1, the std error of hyperloglog is bound by 1/sqrt(size of hash). i.e.,  sqrt(3\*ln(2)-1)/sqrt(2^precision).
see the page 129 of this [paper|]
the performance of hll under different bucket/hash size has been studied. 
See details here:

2, When the estimate cardinalities is large enough, this performance of hll will become problematic
because the hash collisions (saturation). For detail see the study done by Flajolet et al.
In fact, Timok proposed that any number larger than 2^{32}/30 should consider "to large" for
a 32 bit hash. See study [Google’s Take On Engineering HLL|]
and the Figure 8 of [paper|]

This message was sent by Atlassian JIRA

View raw message