56,687
社区成员
发帖
与我相关
我的任务
分享
mysql> SHOW PROFILES;
+----------+------------+------------------------------------------------------------------------------------------------------------------------------+
| Query_ID | Duration | Query |
+----------+------------+------------------------------------------------------------------------------------------------------------------------------+
| 5 | 0.98439500 | SELECT DISTINCT smw_namespace, smw_title, smw_iw FROM `smw_rels2`,`smw_ids` WHERE p_id='8979' AND o_id=smw_id LIMIT 1000 |
| 6 | 0.23709100 | SELECT smw_namespace, smw_title, smw_iw FROM `smw_rels2`,`smw_ids` WHERE p_id='8979' AND o_id=smw_id LIMIT 1000 |
+----------+------------+------------------------------------------------------------------------------------------------------------------------------+
6 rows in set (0.00 sec)
mysql> SHOW PROFILE FOR QUERY 6;
+--------------------------------+----------+
| Status | Duration |
+--------------------------------+----------+
| starting | 0.000013 |
| checking query cache for query | 0.000056 |
| Opening tables | 0.000028 |
| System lock | 0.000017 |
| Table lock | 0.000047 |
| init | 0.000017 |
| optimizing | 0.000018 |
| statistics | 0.000261 |
| preparing | 0.000014 |
| executing | 0.000002 |
| Sending data | 0.236548 |
| end | 0.000008 |
| query end | 0.000004 |
| freeing items | 0.000040 |
| storing result in query cache | 0.000012 |
| logging slow query | 0.000002 |
| cleaning up | 0.000004 |
+--------------------------------+----------+
17 rows in set (0.00 sec)
mysql> SHOW PROFILE FOR QUERY 5;
+--------------------------------+----------+
| Status | Duration |
+--------------------------------+----------+
| starting | 0.000012 |
| checking query cache for query | 0.000061 |
| Opening tables | 0.000020 |
| System lock | 0.000015 |
| Table lock | 0.000045 |
| init | 0.000016 |
| optimizing | 0.000014 |
| statistics | 0.000229 |
| preparing | 0.000013 |
| Creating tmp table | 0.000038 |
| executing | 0.000003 |
| Copying to tmp table | 0.983473 |
| Sending data | 0.000351 |
| end | 0.000004 |
| removing tmp table | 0.000048 |
| end | 0.000004 |
| query end | 0.000004 |
| freeing items | 0.000025 |
| storing result in query cache | 0.000012 |
| logging slow query | 0.000001 |
| cleaning up | 0.000007 |
+--------------------------------+----------+
21 rows in set (0.00 sec)