Description
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.
Attachments
Attachments
Issue Links
- relates to
-
PHOENIX-4972 ORDER BY should use a GLOBAL index even if the query is not fully covered
- Open