Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.1(EOL), 11.2(EOL), 11.4, 11.5(EOL), 11.6(EOL)
-
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
- is duplicated by
-
MDEV-34352 Execution time for Block Nested Loop Hash (BNLH) join with charset utf8mb4 is 7-20 times slower than with latin1
- Closed
- relates to
-
MDEV-34352 Execution time for Block Nested Loop Hash (BNLH) join with charset utf8mb4 is 7-20 times slower than with latin1
- Closed
-
MDEV-34232 Check performance of BNL-H vs MySQL's hash join
- Open
-
MDEV-34417 Wrong result set with utf8mb4_danish_ci and BNLH join
- Closed