クエリが与えられた場合:
SELECT * FROM users;
2つの異なるMySQLクライアントに入ると、根本的に異なる経過時間(またはそれが何であれ)を取得しています:
1537 rows in set (0.01 sec)
1537 rows in set (0.36 sec)
これは (LAMP) アプリケーションでの経験を反映しているので、デバッグしようとしていますが、その計算に含まれるものが具体的にわかりません。
0.01 sec
/読み取り値には何が含まれてい0.30 sec
ますか?
編集:ここshow profile
に36 secs
クエリがあります:
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)
その数にはなりません(0.2363
「データの送信」で以前に与えられていましたが、理由はわかりません)。