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

MDEV-9826: ~2-3% Performance regression upon partion INSERTs when using the default partitioning hashing algorithm

    XMLWordPrintable

Details

    • Related to performance

    Description

      There is an approx 1.6% to 3% performance regression for INSERTs when using the default hashing algorithm for partitioning after the MDEV-9826 implementation:

      CREATE TABLE t (c1 INT NOT NULL, c2 INT, c3 INT, PRIMARY KEY (c1)) ENGINE=InnoDB PARTITION BY KEY(c1) PARTITIONS 16;
      SHOW CREATE TABLE t;
      INSERT INTO t (c1, c2, c3) SELECT seq, seq, seq FROM seq_1_to_200000000;
      

      Yields on the feature tree (bb-main-mdev-9826-v4 at 775ad15a80bf26ce5d29b237110477547631289b):

      bb-main-mdev-9826-v4 CS 12.3.0 775ad15a80bf26ce5d29b237110477547631289b (Optimized, Clang 21.1.3-20250923) Build 20/12/2025

      12.3.0-opt>INSERT INTO t (c1, c2, c3) SELECT seq, seq, seq FROM seq_1_to_200000000;
      Query OK, 200000000 rows affected (6 min 23.711 sec)
      Records: 200000000  Duplicates: 0  Warnings: 0
      

      Versus the same tree --1 commit (i.e. bb-main-mdev-9826-v4 at e85bc659188be021897e8578aec42becfbb58c27}:

      bb-main-mdev-9826-v4 unpatched CS 12.3.0 e85bc659188be021897e8578aec42becfbb58c27 (Optimized, Clang 21.1.3-20250923) Build 20/12/2025

      12.3.0-opt>INSERT INTO t (c1, c2, c3) SELECT seq, seq, seq FROM seq_1_to_200000000;
      Query OK, 200000000 rows affected (6 min 12.841 sec)
      Records: 200000000  Duplicates: 0  Warnings: 0
      

      Which is a ((383.711 / 372.841) - 1) * 100 = 2.9154% performance regression. The number varies but often land around the 2.x mark.

      The regression is consistently reproducible, including with MyISAM instead of InnoDB.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.