phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-4288) Indexes not used when ordering by primary key
Date Tue, 07 Nov 2017 21:44:00 GMT


ASF GitHub Bot commented on PHOENIX-4288:

GitHub user maryannxue opened a pull request:

    PHOENIX-4288 Indexes not used when ordering by primary key

    1. Add class Cost.
    2. Add method getCost() in QueryPlan.
    3. Let QueryOptimizer choose the best plan based on Cost; meanwhile if stats are not available
the QueryOptimizer will keep the original behavior.

You can merge this pull request into a Git repository by running:

    $ git pull phoenix-4388

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #281
commit f75c1b095683c153f8749107c5505304309dcb36
Author: maryannxue <>
Date:   2017-11-07T21:40:37Z

    PHOENIX-4288 Indexes not used when ordering by primary key


> Indexes not used when ordering by primary key
> ---------------------------------------------
>                 Key: PHOENIX-4288
>                 URL:
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Marcin Januszkiewicz
>            Assignee: Maryann Xue
>              Labels: CostBasedOptimization
> We have a table
>   c1 VARCHAR,
>   c2 VARCHAR
> )
> which we want to query by doing partial matches on c1, and keep the ordering of the source
> SELECT rowkey, c1, c2 FROM t where c1 LIKE 'X0%' ORDER BY rowkey;
> We expect most queries to select a small subset of the table, so we create an index to
speed up searches:
> CREATE LOCAL INDEX t_c1_ix ON t (c1);
> However, this index will not be used since Phoenix will always choose not to resort the
> In our actual use case, adding index hints is not a practical solution.
> See also discussion at:

This message was sent by Atlassian JIRA

View raw message