From dev-return-48589-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Fri Jan 19 01:01:10 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 075A7180654 for ; Fri, 19 Jan 2018 01:01:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EBAC8160C48; Fri, 19 Jan 2018 00:01:09 +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 3DAE7160C26 for ; Fri, 19 Jan 2018 01:01:09 +0100 (CET) Received: (qmail 49009 invoked by uid 500); 19 Jan 2018 00:01: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 48988 invoked by uid 99); 19 Jan 2018 00:01:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jan 2018 00:01:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D84CA1808DB for ; Fri, 19 Jan 2018 00:01:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -107.911 X-Spam-Level: X-Spam-Status: No, score=-107.911 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, 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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id x99Dl6BxWmzM for ; Fri, 19 Jan 2018 00:01: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 E43775F1F0 for ; Fri, 19 Jan 2018 00:01: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 0F436E0F6D for ; Fri, 19 Jan 2018 00:01:01 +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 6167B2130B for ; Fri, 19 Jan 2018 00:01:00 +0000 (UTC) Date: Fri, 19 Jan 2018 00:01:00 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-4531) Delete on a table with a global mutable index can issue client-side deletes against the index 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-4531?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16= 331460#comment-16331460 ]=20 James Taylor commented on PHOENIX-4531: --------------------------------------- The {{runOnServer}} variable gets set to false if the index table is chosen= as the best table to drive the delete from. If it was kept as true, then t= he data table would be used. If you have a WHERE clause in the delete that = turns into a range scan when the index is used, this is certainly going to = be better than doing a full table scan using the data table. The case I'm n= ot sure about is if there's no where clause (or the same number of rows wou= ld be scanned for the index or data table). I'm not sure which is better (b= ut probably using the data table since as you mention the parallelization w= ill be better).=20 I think It needs further investigation as to why the hint didn't cause the = data table to be chosen as the best plan. > Delete on a table with a global mutable index can issue client-side delet= es against the index > -------------------------------------------------------------------------= -------------------- > > Key: PHOENIX-4531 > URL: https://issues.apache.org/jira/browse/PHOENIX-4531 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.13.0 > Environment: =20 > Reporter: Vincent Poon > Assignee: Vincent Poon > Priority: Major > Attachments: PHOENIX-4531.v1.master.patch, PHOENIX-4531_v1.patch,= PHOENIX-4531_v2.patch, PartialIndexRebuilderIT.java > > > For a table with a global mutable index, I found the following result in = client-side deletes against both the data table and index table. > "DELETE FROM data_table"=C2=A0 > "DELETE FROM data_table WHERE indexed_col=3D'v'" > We only need the delete to be issued against the data table, because > 1) It's redundant since a delete against the index will be issued on the = server side when we process the delete of the data table row > 2) Deletes issued from the client-side won't have the index failure polic= y -- This message was sent by Atlassian JIRA (v7.6.3#76005)