1. 程式人生 > >Mysql中copying to tmp table事件的相關處理

Mysql中copying to tmp table事件的相關處理

+--------------------------------+-----------+----------+------------+-------------------+---------------------+-------------------+-------------------+
| Status                         | Duration  | CPU_user | CPU_system | Context_voluntary | Context_involuntary | Page_faults_major | Page_faults_minor |
+--------------------------------+-----------+----------+------------+-------------------+---------------------+-------------------+-------------------+
| starting                       |  0.000019 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| Waiting for query cache lock   |  0.000003 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| checking query cache for query |  0.000083 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| checking permissions           |  0.000003 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| checking permissions           |  0.000005 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| Opening tables                 |  0.000020 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| System lock                    |  0.000008 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| Waiting for query cache lock   |  0.000025 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| init                           |  0.000038 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| optimizing                     |  0.000015 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| statistics                     |  0.000113 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 1 |
| preparing                      |  0.000025 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| Creating tmp table             |  0.000162 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 5 |
| executing                      |  0.000003 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
Copying to tmp table           | 52.027014 | 4.992241 |   1.324799 |             17969 |                1828 |                 1 |            251431 |

| Sorting result                 |  0.000066 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                14 |
| Sending data                   |  0.000218 | 0.000000 |   0.000999 |                 0 |                   1 |                 0 |                 1 |
| end                            |  0.000003 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| removing tmp table             |  0.000093 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 1 |
| end                            |  0.000004 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| query end                      |  0.000005 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| closing tables                 |  0.000010 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| freeing items                  |  0.000012 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| Waiting for query cache lock   |  0.000002 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| freeing items                  |  0.000026 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 4 |
| Waiting for query cache lock   |  0.000001 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| freeing items                  |  0.000001 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| storing result in query cache  |  0.000002 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| logging slow query             |  0.000002 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| logging slow query             |  0.000001 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
| cleaning up                    |  0.000003 | 0.000000 |   0.000000 |                 0 |                   0 |                 0 |                 0 |
+--------------------------------+-----------+----------+------------+-------------------+---------------------+-------------------+-------------------+
31 rows in set (0.00 sec)