我正在运行show profile
查询批量插入查询(1000行),我希望尽可能优化其速度
结果如下
mysql> show profile;
+----------------------+----------+
| Status | Duration |
+----------------------+----------+
| starting | 0.965771 |
| checking permissions | 0.000013 |
| Opening tables | 0.000011 |
| System lock | 0.000003 |
| Table lock | 0.000004 |
| init | 0.059567 |
| update | 0.807374 |
| end | 0.000064 |
| query end | 0.000004 |
| freeing items | 0.034606 |
| closing tables | 0.000011 |
| logging slow query | 0.000002 |
| cleaning up | 0.000079 |
+----------------------+----------+
任何人都可以帮助我了解starting
和update
状态的含义,它几乎占用了查询的所有执行时间......
非常感谢