You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2018/10/12 03:07:00 UTC

[jira] [Updated] (PHOENIX-4964) ORDER BY should use a LOCAL index even if the query is not fully covered

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

Lars Hofhansl updated PHOENIX-4964:
-----------------------------------
    Summary: ORDER BY should use a LOCAL index even if the query is not fully covered  (was: ORDER BY does not use an index if the query is not fully covered)

> ORDER BY should use a LOCAL index even if the query is not fully covered
> ------------------------------------------------------------------------
>
>                 Key: PHOENIX-4964
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4964
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Lars Hofhansl
>            Priority: Minor
>         Attachments: PHOENIX-4964-4.x-HBase-1.4.txt, PHOENIX-4964-4.x-HBase-1.4.v2.txt
>
>
> I just noticed that a query like
> {{SELECT <column1> FROM <table> ORDER BY <column2> LIMIT <n>}}
> Does not use an index on <column2> if it does not also include <column1>. That seems too limited.
> I can see the code in QueryOptimizer.addPlan that rewrites the plan only when there's a WHERE clause, and then only for the WHERE clause. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)