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

Increase concurrency/speed of AES_ENCRYPT

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Server
    • None

    Description

      In testing with multiple tables in InnoDB performing a SELECT INTO OUTFILE on the following example table(s) with from a single client to multiple clients the throughput is reduced from 1.8M rows/sec to 85K rows/sec total with 5 tables:

      CREATE TABLE my_test<NUM> ( -- <NUM> 01 to 10
      myid1 BIGINT(20) NOT NULL,
      myid2 BIGINT(20) NOT NULL,
      myotherid TINYINT(4) NOT NULL,
      myflag TINYINT(4) NOT NULL DEFAULT 0,
      insert_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(),
      update_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP(),
      PRIMARY KEY (myid1,myid2),
      KEY ak_my_test1 (myid2)
      ) ENGINE=INNODB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
       
      SELECT
      AES_ENCRYPT(myid2,6954f9fbe878b7999720bc443e47e78d88164386ba6bf8c56e5c65a6e44eb1fb9f6053329981ba4f10a6db5d6ac41c9253c09711d2e7ac5aa1ee9a6eb9fd084e),
      AES_ENCRYPT(myid2,6954f9fbe878b7999720bc443e47e78d88164386ba6bf8c56e5c65a6e44eb1fb9f6053329981ba4f10a6db5d6ac41c9253c09711d2e7ac5aa1ee9a6eb9fd084e),
      myotherid,
      myflag,
      insert_date,
      update_date
      INTO OUTFILE '<Separate SSD from tables>'
      FIELDS TERMINATED BY ','
      ENCLOSED BY '\"'
      ESCAPED BY '\\\\'
      FROM my_test01 FORCE INDEX (PRIMARY);
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kjoiner Kyle Joiner (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              9 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.