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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.1
    • Fix Version/s: 2.9
    • Component/s: sql
    • Labels:
      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

          Activity

            People

            • Assignee:
              zstan Stanilovsky Evgeny
              Reporter:
              zstan Stanilovsky Evgeny

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Issue deployment