+------+-------------+-------+--------+---------------+---------+---------+-------------+------+----------+------------------------------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+------+-------------+-------+--------+---------------+---------+---------+-------------+------+----------+------------------------------------------------------------------+
| 1 | PRIMARY | c | ALL | PRIMARY | NULL | NULL | NULL | 1 | 100.00 | Using where; Start temporary |
| 1 | PRIMARY | b | eq_ref | PRIMARY | PRIMARY | 4 | test.c.b_id | 1 | 100.00 | Using index |
| 1 | PRIMARY | b | index | PRIMARY | PRIMARY | 4 | NULL | 2 | 100.00 | Using index; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | d | ALL | NULL | NULL | NULL | NULL | 10 | 100.00 | Using where; Using join buffer (incremental, BNL join) |
| 1 | PRIMARY | a | eq_ref | PRIMARY | PRIMARY | 4 | test.d.a_id | 1 | 100.00 | Using index |
| 1 | PRIMARY | a | eq_ref | PRIMARY | PRIMARY | 4 | test.d.a_id | 1 | 100.00 | Using where; End temporary |
| 1 | PRIMARY | c | ALL | PRIMARY | NULL | NULL | NULL | 1 | 100.00 | Using where; Start temporary; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | b | eq_ref | PRIMARY | PRIMARY | 4 | test.c.b_id | 1 | 100.00 | Using index |
| 1 | PRIMARY | d | ALL | NULL | NULL | NULL | NULL | 10 | 100.00 | Using where; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | a | eq_ref | PRIMARY | PRIMARY | 4 | test.d.a_id | 1 | 100.00 | Using where; End temporary |
| 1 | PRIMARY | c | ALL | PRIMARY | NULL | NULL | NULL | 1 | 100.00 | Using where; Start temporary; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | b | eq_ref | PRIMARY | PRIMARY | 4 | test.c.b_id | 1 | 100.00 | Using index |
| 1 | PRIMARY | d | ALL | NULL | NULL | NULL | NULL | 10 | 100.00 | Using where; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | a | eq_ref | PRIMARY | PRIMARY | 4 | test.d.a_id | 1 | 100.00 | Using where; End temporary |
| 1 | PRIMARY | c | ALL | PRIMARY | NULL | NULL | NULL | 1 | 100.00 | Using where; Start temporary; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | c | ALL | PRIMARY | NULL | NULL | NULL | 1 | 100.00 | Using where; Using join buffer (incremental, BNL join) |
| 1 | PRIMARY | d | ALL | NULL | NULL | NULL | NULL | 10 | 100.00 | Using where; Using join buffer (incremental, BNL join) |
| 1 | PRIMARY | a | eq_ref | PRIMARY | PRIMARY | 4 | test.d.a_id | 1 | 100.00 | Using where |
| 1 | PRIMARY | a | eq_ref | PRIMARY | PRIMARY | 4 | test.d.a_id | 1 | 100.00 | Using where |
| 1 | PRIMARY | a | eq_ref | PRIMARY | PRIMARY | 4 | test.d.a_id | 1 | 100.00 | |
| 1 | PRIMARY | d | ALL | NULL | NULL | NULL | NULL | 10 | 100.00 | Using where; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | b | eq_ref | PRIMARY | PRIMARY | 4 | test.c.b_id | 1 | 100.00 | Using index; End temporary |
| 1 | PRIMARY | c | ALL | PRIMARY | NULL | NULL | NULL | 1 | 100.00 | Using where; Start temporary; Using join buffer (flat, BNL join) |
| 1 | PRIMARY | b | eq_ref | PRIMARY | PRIMARY | 4 | test.a.b_id | 1 | 100.00 | Using index |
| 1 | PRIMARY | d | ALL | NULL | NULL | NULL | NULL | 10 | 100.00 | Using where; End temporary; Using join buffer (flat, BNL join) |
+------+-------------+-------+--------+---------------+---------+---------+-------------+------+----------+------------------------------------------------------------------+
25 rows in set, 1 warning (1 min 29.09 sec)
Hi Steven,
Thanks for the report.
EXPLAIN on current MariaDB 5.5:
EXPLAIN on MySQL 5.6:
ANALYZE on current 10.1: