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 2196E200B96 for ; Thu, 22 Sep 2016 04:58:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 202D3160ADE; Thu, 22 Sep 2016 02:58:22 +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 65A5F160ADB for ; Thu, 22 Sep 2016 04:58:21 +0200 (CEST) Received: (qmail 99232 invoked by uid 500); 22 Sep 2016 02:58:20 -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 99220 invoked by uid 99); 22 Sep 2016 02:58:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2016 02:58:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 69AB22C0D57 for ; Thu, 22 Sep 2016 02:58:20 +0000 (UTC) Date: Thu, 22 Sep 2016 02:58:20 +0000 (UTC) From: "wangweiyi (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PHOENIX-3310) where clause optimization in join queries work not well MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 22 Sep 2016 02:58:22 -0000 [ https://issues.apache.org/jira/browse/PHOENIX-3310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] wangweiyi updated PHOENIX-3310: ------------------------------- Description: select * from xxx x join yyy y on x.col1=y.col1 where x.col1='1' select * from xxx x join yyy y on x.col1=y.col1 where y.col1='1' the column "col1" is the primary key for table "xxx" and table "yyy" the above SQL do full scan over either table "xxx" or "yyy". if the join compiler take where clause into account, this can be optimized. was: select * from xxx x join yyy y on x.col1=y.col1 where x.col1='1' select * from xxx x join yyy y on x.col1=y.col1 where y.col1='1' the column "col1" is the primary key for table "xxx" and table "yyy" the above SQL do full scan over either table "xxx" or "yyy". if the join compiler take the where clause into account, this can be optimized. > where clause optimization in join queries work not well > ------------------------------------------------------- > > Key: PHOENIX-3310 > URL: https://issues.apache.org/jira/browse/PHOENIX-3310 > Project: Phoenix > Issue Type: Improvement > Affects Versions: 4.8.0 > Reporter: wangweiyi > > select * from xxx x join yyy y on x.col1=y.col1 where x.col1='1' > select * from xxx x join yyy y on x.col1=y.col1 where y.col1='1' > the column "col1" is the primary key for table "xxx" and table "yyy" > the above SQL do full scan over either table "xxx" or "yyy". if the join compiler take where clause into account, this can be optimized. -- This message was sent by Atlassian JIRA (v6.3.4#6332)