[ 
https://issues.apache.org/jira/browse/PHOENIX-4064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16113830#comment-16113830
 ] 

jifei_yang commented on PHOENIX-4064:
-------------------------------------

The sql is :

{code:java}
explain select COMMANDID,CDNNETID,DOMAIN,SERVICECONTENT,ILLEGALTYPE  from  
PH_ILLEGALWEB_APP  where   CREATETIME= '2017-08-03'  and instr(CDNNETID,'a1a') 
>0 and  DOMAIN in('mvvideo4.meitudata.com')  group by 
DOMAIN,CDNNETID,COMMANDID,SERVICECONTENT,ILLEGALTYPE  ;
{code}

and explain is :

{code:java}
 CLIENT 3-CHUNK 0 ROWS 0 BYTES PARALLEL 3-WAY RANGE SCAN OVER PH_ILLEGALWEB_APP 
[0,'2017-08-03'] - [2,'2017-08-03']  |
   SERVER FILTER BY FIRST KEY ONLY AND (INSTR(CDNNETID, 'a1a') > 0 AND DOMAIN = 
'mvvideo4.meitudata.com')          |
    SERVER DISTINCT PREFIX FILTER OVER [DOMAIN, CDNNETID, COMMANDID, 
SERVICECONTENT, ILLEGALTYPE]                   |
     SERVER AGGREGATE INTO ORDERED DISTINCT ROWS BY [DOMAIN, CDNNETID, 
COMMANDID, SERVICECONTENT, ILLEGALTYPE]       |
 CLIENT MERGE SORT 
{code}


>  Why the group by the index field will execute scan over table.
> ---------------------------------------------------------------
>
>                 Key: PHOENIX-4064
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4064
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.11.0
>            Reporter: jifei_yang
>              Labels: features
>             Fix For: 4.11.0
>
>
> Why the group by the index field will execute scan over table.
> I created a Phoenix table, and then created the index, all the fields are 
> marked as index. However, when the group by index field is executed, the 
> execution plan is viewed and the index is not used. Please help solve the 
> next, thank you.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to