[ 
https://issues.apache.org/jira/browse/PHOENIX-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lars Hofhansl updated PHOENIX-258:
----------------------------------
    Attachment: 258-v4.txt

* -v4 has some basic tests.
* It also deals with the scenario of a fixed length key prefix that cannot be 
incremented any further (in which case we're done with the scan)
* Doesn't use this optimization unless the number of keys parts used in the 
group by or distinct is less than the number of keys in the table (if it was 
the same we'd necessary return all rows anyway)

Tomorrow I will add some query tests, and then this should be good to go.

We could even turn this on always (not just when the SKIP_SCAN hint is given).

> Use skip scan when SELECT DISTINCT on leading row key column(s)
> ---------------------------------------------------------------
>
>                 Key: PHOENIX-258
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-258
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: ryang-sfdc
>              Labels: gsoc2016
>             Fix For: 4.8.0
>
>         Attachments: 258-WIP.txt, 258-v1.txt, 258-v2.txt, 258-v3.txt, 
> 258-v4.txt, 258.txt, DistinctFixedPrefixFilter.java, in-clause.png
>
>
> create table(a varchar(32) not null, date date not null constraint pk primary 
> key(a,date))
> [["PLAN"],["CLIENT PARALLEL 94-WAY FULL SCAN OVER foo"],["    SERVER 
> AGGREGATE INTO ORDERED DISTINCT ROWS BY [a]"],["CLIENT MERGE SORT"]]          
>    
> We should skip scan.



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

Reply via email to