
mysql> explain select id, rgroup from rot_galleries where id not in (select distinct(gal_id) from rot_gal2group);
+----+--------------------+---------------+----------------+---------------+--------+---------+------+--------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+--------------------+---------------+----------------+---------------+--------+---------+------+--------+--------------------------+
| 1 | PRIMARY | rot_galleries | index | NULL | rgroup | 4 | NULL | 323054 | Using where; Using index |
| 2 | DEPENDENT SUBQUERY | rot_gal2group | index_subquery | gal_id | gal_id | 4 | func | 1 | Using index |
+----+--------------------+---------------+----------------+---------------+--------+---------+------+--------+--------------------------+
2 rows in set (0.00 sec)







