0

I am running show profile query againt a batched insert query (1000 rows) which i want to optimize its speed as possible as i could

Here is the result

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 | 
+----------------------+----------+

Could anyone help me know the meaning of starting and update status which took almost all the executing time of the query ...

Many Thanks

egyptian_M
  • 39
  • 7
  • For the dupe close target: There are links. Some dated, some links off of links, that all point to that information. Even if off the digital ocean page. Perhaps you can create a good answer over on that canonical and not have this info spread out all over the place. Here is a good one [General Thread States](http://dev.mysql.com/doc/refman/5.7/en/general-thread-states.html) – Drew Oct 30 '16 at 10:59
  • @Drew Your link is very informative, but I don't think so that this question is only about calculating query time. Rather its about how to read Profiling result set. So it doesn't make it duplicate of **How to estimate SQL query timing**. – Shaharyar Oct 30 '16 at 11:28
  • @Shaharyar "Could anyone help me know the meaning of starting and update status which ..." – Drew Oct 30 '16 at 11:31
  • That question doesn't contain any explanation regarding **starting** and **update** status. Thats what I meant. – Shaharyar Oct 30 '16 at 11:37
  • They are mentioned 3/4th the way down the [Digital Ocean doc](http://i.imgur.com/hKAbwv5.jpg) as mentioned, and any url can be changed to 5.7 from 5.5 to see any changes (typically none). One ought to create a good repository on S.O. as I mentioned. Create another great answer, ping us for upvotes – Drew Oct 30 '16 at 11:45

0 Answers0