Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15368

Unnecessary condition used in Index Condition Pushdown

    XMLWordPrintable

Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5, 10.0, 10.1, 10.2, 10.3
    • 10.4
    • None
    • None

    Description

      EXPLAIN SELECT MIN(b), MIN(c) FROM t1 WHERE a = 1;
      id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
      1	SIMPLE	t1	ref	a	a	5	const	2	Using index condition
      analyze format=json
      SELECT MIN(b), MIN(c) FROM t1 WHERE a = 1;
      ANALYZE
      {
        "query_block": {
          "select_id": 1,
          "r_loops": 1,
          "r_total_time_ms": 0.0893,
          "table": {
            "table_name": "t1",
            "access_type": "ref",
            "possible_keys": ["a"],
            "key": "a",
            "key_length": "5",
            "used_key_parts": ["a"],
            "ref": ["const"],
            "r_loops": 1,
            "rows": 2,
            "r_rows": 3,
            "r_total_time_ms": 0.0462,
            "filtered": 100,
            "r_filtered": 100,
            "index_condition": "1"
          }
        }
      }
      

      So here we see that we have a pushed index condition but as you see that is a constant , not mentioned in the where clause of the query. So we should not be having such a index condition.

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              varun Varun Gupta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.