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

EXPLAIN plan 'key' changed for same query after upgrade from 10.3 to 10.4 in same dataset

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Incomplete
    • 10.4.19
    • N/A
    • Optimizer
    • CentOS

    Description

      After making optimizer_use_condition_selectivity=1 from 4 and disabling the below optimizer_switch options that weren't enabled in 10.3.21 we still get a different 'key' selected. As a result query that took ~0.5 sec in 10.3 takes ~1.5 min in 10.4

      • optimize_join_buffer_size
      • condition_pushdown_for_subquery
      • rowid_filter
      • condition_pushdown_from_having

      FORCE INDEX (key used in 10.3) however worked in 10.4 and execution time was same like 10.3

      EXPLAIN IN 10.4

      id: 1
      select_type: SIMPLE
      table: table_name
      type: range
      possible_keys: index_table_col1, index_table_col2, ... ,index_table_col6
      key: index_table_col6
      key_len: 4
      ref: NULL
      rows: 80196
      Extra: Using index condition; Using where
      1 row in set (0.003 sec)
      

      Same Query in 10.3

      id: 1
      select_type: SIMPLE
      table: table_name
      type: range
      possible_keys:  index_table_col1, index_table_col2, ... ,index_table_col6
      key: index_table_col5
      key_len: 7
      ref: NULL
      rows: 65841
      Extra: Using index condition; Using where
      1 row in set (0.017 sec)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            Koustuv Koustuv Chatterjee
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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