Bug #72501 | joining NULLs + different collation is not efficient | ||
---|---|---|---|
Submitted: | 1 May 2014 17:31 | ||
Reporter: | Arnaud Adant | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.6.17 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[1 May 2014 17:31]
Arnaud Adant
[1 May 2014 18:12]
Arnaud Adant
Confusing since the plan does not show anything problematic : mysql> explain select (select count(*) from t1 where t1.c1 = t2.c1 collate utf8_general_ci) cnt from t2 limit 10; +----+--------------------+-------+------+---------------+------+---------+------+--------+--------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+--------------------+-------+------+---------------+------+---------+------+--------+--------------------------+ | 1 | PRIMARY | t2 | ALL | NULL | NULL | NULL | NULL | 557166 | NULL | | 2 | DEPENDENT SUBQUERY | t1 | ref | c1 | c1 | 768 | func | 1 | Using where; Using index | +----+--------------------+-------+------+---------------+------+---------+------+--------+--------------------------+ 2 rows in set (0.01 sec)