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

With Parallel execution Performance degradation seen in JOIN query

    XMLWordPrintable

Details

    • Related to performance

    Description

      Huge performance drop seen in JOIN query:

      Query:
      select * from s1 join s2 on(1);

      Serial execution: 0.19sec
      Parallel execution : 2.167sec

      For analyze output refer:
      serial : analyze-json.txt
      Parallel : analyze-json-PQ.txt

      Version details:

      ----------------------
      Branch: bb-13.2-MDEV-40012-refactored-input3
      Commit:fcf80b7794ee57993cf7001a288a53b47a7e74ed
      Version:13.1.0

      How to repro:

      CREATE TABLE s1 (a INT PRIMARY KEY, b INT, c VARCHAR(50), d DECIMAL(10,2), KEY(b)) ENGINE=InnoDB;
      INSERT INTO s1 SELECT seq, seq%100, CONCAT('v',seq%7), seq/3 FROM seq_1_to_1000;
      ANALYZE TABLE s1;
       
      CREATE TABLE s2 (a INT PRIMARY KEY, b INT, c VARCHAR(50), d DECIMAL(10,2), KEY(b)) ENGINE=InnoDB;
      INSERT INTO s2 SELECT seq, seq%100, CONCAT('v',seq%7), seq/3 FROM seq_1_to_2000;
      ANALYZE TABLE s2;
       
      SET SESSION parallel_worker_threads = 0;
      select * from s1 join s2 on(1);
       
      SET SESSION parallel_worker_threads = 4;
      select * from s1 join s2 on(1);
      

      Attachments

        1. analyze-json.txt
          7 kB
          Pavithra Pandith
        2. analyze-json-PQ.txt
          9 kB
          Pavithra Pandith

        Issue Links

          Activity

            People

              Johnston Rex Johnston
              mariadb-pavithrapandith Pavithra Pandith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Time Spent - 3h Remaining Estimate - 2d
                  2d
                  Logged:
                  Time Spent - 3h Remaining Estimate - 2d
                  3h

                  Git Integration

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