Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13280

Improper index usage, fields enumeration not used with pk index creation.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8.1
    • 2.9
    • sql
    • None

    Description

      For example:

      CREATE TABLE PUBLIC.TEST_TABLE (FIRST_NAME VARCHAR, LAST_NAME VARCHAR, ADDRESS VARCHAR, LANG VARCHAR,  CONSTRAINT PK_PERSON PRIMARY KEY (FIRST_NAME, LAST_NAME));
      
      CREATE INDEX "idx2" ON PUBLIC.TEST_TABLE (LANG, ADDRESS);
      

      and further explain:

      SELECT
          "__Z0"."FIRST_NAME" AS "__C0_0",
          "__Z0"."LAST_NAME" AS "__C0_1",
          "__Z0"."ADDRESS" AS "__C0_2",
          "__Z0"."LANG" AS "__C0_3"
      FROM "PUBLIC"."TEST_TABLE" "__Z0"
          /* PUBLIC.IDX2: ADDRESS > 0 */
      WHERE "__Z0"."ADDRESS" > 0
      

      this is erroneous to use "idx2" here, because first index field LANG not equals to predicate ADDRESS.
      Looks like this bug brings this ticket [1]

      [1] https://issues.apache.org/jira/browse/IGNITE-10217

      Attachments

        Issue Links

          Activity

            People

              zstan Evgeny Stanilovsky
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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