如图
解决方案
40
插入数据后,就有实际的执行计划了:
mysql> insert into t_dept values(10,"xxx"); Query OK, 1 row affected (0.06 sec) mysql> explain select * from t_dept where deptno=10; +--+--+--+--+--+--+--+--+--+--+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +--+--+--+--+--+--+--+--+--+--+ | 1 | SIMPLE | t_dept | const | deptno,index_deptno | deptno | 5 | const | 1 | | +--+--+--+--+--+--+--+--+--+--+ 1 row in set (0.03 sec) mysql>