phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-4964) ORDER BY does not use an index if the query is not fully covered
Date Wed, 10 Oct 2018 20:45:00 GMT
Lars Hofhansl created PHOENIX-4964:
--------------------------------------

             Summary: ORDER BY does not use an index 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


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)

Mime
View raw message