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)
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.