From dev-return-49301-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Fri Feb 9 23:41:11 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 154F8180676 for ; Fri, 9 Feb 2018 23:41:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 055DF160C3C; Fri, 9 Feb 2018 22:41:11 +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 4C776160C4C for ; Fri, 9 Feb 2018 23:41:10 +0100 (CET) Received: (qmail 98219 invoked by uid 500); 9 Feb 2018 22:41:03 -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 98149 invoked by uid 99); 9 Feb 2018 22:41:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2018 22:41:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id EEC11C0163 for ; Fri, 9 Feb 2018 22:41:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 4L2XCwcchpK3 for ; Fri, 9 Feb 2018 22:41:02 +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 D2E545FAC9 for ; Fri, 9 Feb 2018 22:41:01 +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 C68B2E0295 for ; Fri, 9 Feb 2018 22:41:00 +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 2D59324102 for ; Fri, 9 Feb 2018 22:41:00 +0000 (UTC) Date: Fri, 9 Feb 2018 22:41:00 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-1556) Base hash versus sort merge join decision on cost MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-1556?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 359066#comment-16359066 ]=20 James Taylor commented on PHOENIX-1556: --------------------------------------- bq. Yes. stripSkipScanFilter() also aims to eliminate things like PageFilte= r and looks to keep only boolean expression filters that cannot be pushed i= nto PK. One thing with PageFilter is that it represents the limit pushed down to th= e server. Since the limit cannot always be pushed down (depending on the qu= ery - for example an aggregate query can push down the limit only if it's a= ggregating on the leading part of the pk), should we consider that? Or do y= ou think we can reliably get the limit that's pushed to the server from the= query plan? bq. A probably more realistic approach here might be to set a configurable = "limit" for specific operators That's a good idea. I'll file a JIRA and copy/paste your explanation there. +1 to the patch (assuming tests pass locally for you -- FYI test with the 4= .x-HBase-1.3 branch as there are test failures in master). Great work! > Base hash versus sort merge join decision on cost > ------------------------------------------------- > > Key: PHOENIX-1556 > URL: https://issues.apache.org/jira/browse/PHOENIX-1556 > Project: Phoenix > Issue Type: Sub-task > Reporter: James Taylor > Assignee: Maryann Xue > Priority: Major > Labels: CostBasedOptimization > Attachments: PHOENIX-1556.patch > > > At compile time, we know how many guideposts (i.e. how many bytes) will b= e scanned for the RHS table. We should, by default, base the decision of us= ing the hash-join verus many-to-many join on this information. > Another criteria (as we've seen in=C2=A0PHOENIX-4508) is whether or not t= he tables being joined are already ordered by the join key. In that case, i= t's better to always use the sort merge join. -- This message was sent by Atlassian JIRA (v7.6.3#76005)