These are the results of a query I’m profiling in MySQL. I’ve never had problems with or even noticed the “statistics” row in the past, could someone explain what this field is and why it could be so high?
Thanks.
±---------------------±----------+
| Status | Duration |
±---------------------±----------+
| (initialization) | 0.0000027 |
| Opening tables | 0.006038 |
| System lock | 0.0000072 |
| Table lock | 0.0000095 |
| init | 0.0000905 |
| optimizing | 0.000039 |
| statistics | 51.108223 |
| preparing | 0.0000975 |
| Creating tmp table | 0.0015625 |
| executing | 0.000003 |
| Copying to tmp table | 0.001369 |
| Sorting result | 0.0000155 |
| Sending data | 0.0002792 |
| end | 0.0000045 |
| removing tmp table | 0.0006055 |
| end | 0.000005 |
| query end | 0.0000052 |
| freeing items | 0.000025 |
| removing tmp table | 0.0000215 |
| freeing items | 0.0000072 |
| closing tables | 0.0000585 |
| logging slow query | 0.000003 |
±---------------------±----------+
22 rows in set (0.00 sec)
mysql>