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

Lars Hofhansl commented on PHOENIX-3005:
----------------------------------------

It's as simple as {{SELECT COUNT(DISTINCT c1) FROM T}} where there is an index 
on c1. {{CREATE INDEX T_idx ON T(c1)}}. C1 is of type INTEGER.
In the debugger I see that the expression c1 (which we add to the GROUP BY 
expression after removing the COUNT(DISTINCT) part) is not considered order 
preserving.


> Use DistinctPrefixFilter for DISTINCT index scans
> -------------------------------------------------
>
>                 Key: PHOENIX-3005
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3005
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Lars Hofhansl
>             Fix For: 4.8.0
>
>
> Currently the optimization in PHOENIX-258 is not used for DISTINCT index 
> scans. We should add that as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to