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

Query does not recognize advantage of using primary key index

    XMLWordPrintable

Details

    • Related to performance
    • Q4/2025 Server Maintenance

    Description

      A query that responds immediately in 10.5 and 10.6 takes 13 seconds on 11.4.

      root@alone11:~/support_az214394$ mariadb -ABNe "select version()"
      11.4.4-MariaDB-deb12
      root@alone11:~/support_az214394$ mariadb < az214394.sql
      root@alone11:~/support_az214394$ time mariadb < query.sql 1>/dev/null
       
      real    0m13.527s
      user    0m0.045s
      sys     0m0.005s
      root@alone11:~/support_az214394$ # testing the same query using  FORCE INDEX(PRIMARY)
      root@alone11:~/support_az214394$ time mariadb < query_with_force.sql 1>/dev/null
       
      real    0m0.066s
      user    0m0.049s
      sys     0m0.000s
      root@alone11:~/support_az214394$
      

      Using attachment, you can test this.

      Attachments

        Issue Links

          Activity

            People

              oleg.smirnov Oleg Smirnov
              edward Edward Stoever
              Votes:
              0 Vote for this issue
              Watchers:
              8 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.