Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4811

Phoenix Secondary Index isn't be used

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 4.13.1
    • Fix Version/s: None
    • Labels:
    • Environment:

      Operating System : centos6.9 ;

      Phoenix version : 4.13.1;

      HBase version : 1.3.1;

    • Flags:
      Important

      Description

      I created two indexes (not Covered Indexes):

      create table test(id varchar not null primary key,name varchar,age varchar ,sex varchar);
       create local index if not exists val_test_name on test(name);
       create local index if not exists val_test_age on test(age);
       upsert into test(id,name,age,sex)values('myid','name','age','sex');

      It is work to use one index:

        explain select name from test where name = 'name';

      But why can't hit index when using multiple indexes?

        explain select name,age from test where name = 'name' and age = 'age';

       

       

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              MariaCarrie 张延召
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified