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

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

Lemme try. There's also an addition needed into my code from parent. If we're 
scanning along an index the optimization could help even when all "keys" are 
selected (along the PK that does not make sense, since we would be guaranteed 
to see each combination exactly once).

Seems there's room for another optimization:
* COUNT(DISTINCT fullPK) == COUNT(fullPK)
* DISCTINCT(fullPK) == fullPK
* GROUP BY fullPK == noop

Not sure these are common, so probably not worth spending much time on.


> 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