Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C181C200D08 for ; Wed, 6 Sep 2017 09:01:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C058E161E33; Wed, 6 Sep 2017 07:01:27 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1A79E161E36 for ; Wed, 6 Sep 2017 09:01:26 +0200 (CEST) Received: (qmail 34955 invoked by uid 500); 6 Sep 2017 07:01:25 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 34930 invoked by uid 99); 6 Sep 2017 07:01:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2017 07:01:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 069D0D5A92 for ; Wed, 6 Sep 2017 07:01:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id wgGeggrdsK4B for ; Wed, 6 Sep 2017 07:01:24 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E256961267 for ; Wed, 6 Sep 2017 07:01:22 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EE6B8E0EDB for ; Wed, 6 Sep 2017 07:01:21 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 64A042418E for ; Wed, 6 Sep 2017 07:01:17 +0000 (UTC) Date: Wed, 6 Sep 2017 07:01:17 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4160) research for a proper hash size set for APPROX_COUNT_DISTINCT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Sep 2017 07:01:27 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-4160?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 154912#comment-16154912 ]=20 James Taylor commented on PHOENIX-4160: --------------------------------------- [~lhofhansl] - likely a duplicate of PHOENIX-4164? [~aertoria] has some gre= at pointers - what's your opinion on the best way to go? > research for a proper hash size set for APPROX_COUNT_DISTINCT > ------------------------------------------------------------- > > Key: PHOENIX-4160 > URL: https://issues.apache.org/jira/browse/PHOENIX-4160 > Project: Phoenix > Issue Type: Improvement > Environment:=20 > Reporter: Ethan Wang > > Now after -PHOENIX-418- finishes, we want to study to find a proper defau= lt size for hll hash. Currently the hash size is hard coded as 25/16 bits b= y default (a design we follow Apache Druid. discussion see CALCITE-1588). > Note: > 1, the std error of hyperloglog is bound by 1/sqrt(size of hash). i.e., = {code:java}sqrt(3\*ln(2)-1)/sqrt(2^precision){code} Detail see the page 129= of this [paper|http://algo.inria.fr/flajolet/Publications/FlFuGaMe07.pdf]. > To try on a bigger size, the performance of hll under different bucket/ha= sh size has been studied here: https://metron.apache.org/current-book/metro= n-analytics/metron-statistics/HLLP.html > 2, When the estimate cardinalities is large enough, as Timok and Flajolet= et al found out, this performance of hll will become problematic because t= he hash collisions (saturation). In fact, Timok proposed that any number la= rger than {code}2^{32}/30{code} should consider "to large" for a 32 bit has= h. See study [Google=E2=80=99s Take On Engineering HLL|https://research.neu= star.biz/2013/01/24/hyperloglog-googles-take-on-engineering-hll/] and sugge= sted by the Figure 8 of this [paper|https://stefanheule.com/papers/edbt13-h= yperloglog.pdf] -- This message was sent by Atlassian JIRA (v6.4.14#64029)