[ https://issues.apache.org/jira/browse/PHOENIX-4531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16331460#comment-16331460 ]
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 the 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 not sure about is if there's no where clause (or the same number of rows would be scanned for the index or data table). I'm not sure which is better (but probably using the data table since as you mention the parallelization will be better). 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 deletes > 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: > 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" > "DELETE FROM data_table WHERE indexed_col='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 policy -- This message was sent by Atlassian JIRA (v7.6.3#76005)