Given a query:
SELECT * FROM users;
Entered into two different MySQL clients, I'm getting radically different elapsed time (or whatever it's called):
1537 rows in set (0.01 sec)
1537 rows in set (0.36 sec)
This mirrors the experience in the (LAMP) application, so I'm trying to debug that, but don't know specifically what it encompasses in that calculation.
What is included in the 0.01 sec
/0.30 sec
readouts?
Edit: Here is the show profile
on the 36 secs
query:
mysql> show profile;
--------------
show profile
--------------
+------------------------+----------+
| Status | Duration |
+------------------------+----------+
| Starting | 0.000045 |
| checking permissions | 0.000005 |
| Opening tables | 0.000018 |
| After opening tables | 0.000004 |
| System lock | 0.000005 |
| table lock | 0.000007 |
| init | 0.000037 |
| Optimizing | 0.000009 |
| Statistics | 0.000013 |
| Preparing | 0.000015 |
| Executing | 0.000002 |
| Sending data | 0.010229 |
| End of update loop | 0.000010 |
| Query end | 0.000002 |
| Commit | 0.000004 |
| closing tables | 0.000003 |
| Unlocking tables | 0.000001 |
| closing tables | 0.000007 |
| Starting cleanup | 0.000002 |
| Freeing items | 0.000006 |
| Updating status | 0.000014 |
| Reset for next command | 0.000003 |
+------------------------+----------+
22 rows in set (0.05 sec)
Which don't add up to that number (it was giving 0.2363
earlier on "Sending data" but that came down, not sure why).