利用explain查看sql语句的执行计划
可以查看是不是能优化查询
explain select * from student where dept='shuxue' \G;
*************************** 1. row *************************** id: 1 select_type: SIMPLE table: student partitions: NULL type: ref possible_keys: index_drop key: index_drop key_len: 11 ref: const rows: 1 filtered: 100.00 Extra: Using where 1 row in set, 1 warning (0.00 sec) ERROR: No query specified

浙公网安备 33010602011771号