- 论坛徽章:
- 0
|
mysql> explain select tb_smlvideo_Category.SourceId,tb_smlvideo_Category.Category from tb_smlvideo_Category,(select tb_smlvideo_Category.Sourc
eId from tb_smlvideo_Category where tb_smlvideo_Category.Category='') as tb_smlvideo_CategorySourceId where tb_smlvideo_Category.SourceId=tb_smlvideo_CategorySourceId.SourceId;
+----+-------------+----------------------+--------+---------------+----------+---------+------+-------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+----------------------+--------+---------------+----------+---------+------+-------+--------------------------+
| 1 | PRIMARY | <derived2> | system | NULL | NULL | NULL | NULL | 0 | const row not found |
| 1 | PRIMARY | tb_smlvideo_Category | index | NULL | Category | 54 | NULL | 19506 | Using where; Using index |
| 2 | DERIVED | tb_smlvideo_Category | ref | Category | Category | 50 | | 1 | Using where; Using index |
该表如果优化的话,还需要从哪几方面来做? |
|