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

BNL-H has not optimal implementation for varchar type

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.1, 11.2, 11.4, 11.5, 11.6
    • 11.6
    • Optimizer
    • None

    Description

      BNL-H has not optimal implementation for varchar type. The query execution time increases in direct proportion with increasing size of varchar for the same data.

      Example:

      CREATE OR REPLACE TABLE t1(col1 VARCHAR(500)) engine=INNODB character set latin1 collate latin1_swedish_ci;
      CREATE OR REPLACE TABLE t2(col2 VARCHAR(500)) engine=INNODB character set latin1 collate latin1_swedish_ci;
      insert into t1 select  FLOOR(1 + (RAND() * 200000)) from seq_1_to_20000;
      insert into t2 select  FLOOR(1 + (RAND() * 20000))  from seq_1_to_20000;
      set join_cache_level=3;
      select max(A.col1) from t1 A, t2 B where A.col1=B.col2;
      

      Time execution: 0.204 sec

      CREATE OR REPLACE TABLE t1(col1 VARCHAR(2000)) engine=INNODB character set latin1 collate latin1_swedish_ci;
      CREATE OR REPLACE TABLE t2(col2 VARCHAR(2000)) engine=INNODB character set latin1 collate latin1_swedish_ci;
      insert into t1 select  FLOOR(1 + (RAND() * 200000)) from seq_1_to_20000;
      insert into t2 select  FLOOR(1 + (RAND() * 20000))  from seq_1_to_20000;
      set join_cache_level=3;
      select max(A.col1) from t1 A, t2 B where A.col1=B.col2;
      

      Time execution: 0.793 sec

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.