WEB开发网
开发学院数据库MySQL Mysql教程:性能跟踪语句 阅读

Mysql教程:性能跟踪语句

 2008-08-30 11:07:25 来源:WEB开发网   
核心提示: mysql> show profile for query 2;++--+| Status | Duration |++--+| (initialization) | 0.000004 || checking query cache for query | 0.000044 || O

mysql> show profile for query 2;

+--------------------------------+----------+

| Status             | Duration |

+--------------------------------+----------+

| (initialization)        | 0.000004 |

| checking query cache for query | 0.000044 |

| Opening tables         | 0.000012 |

| System lock          | 0.000017 |

| Table lock           | 0.00003 |

| init              | 0.000013 |

| optimizing           | 0.000008 |

| statistics           | 0.000013 |

| preparing           | 0.000011 |

| executing           | 0.000006 |

| Sending data          | 0.747313 |

| end              | 0.000014 |

| query end           | 0.000006 |

| storing result in query cache | 0.000006 |

| freeing items         | 0.000012 |

| closing tables         | 0.000009 |

| logging slow query       | 0.000183 |

+--------------------------------+----------+

17 rows in set (0.00 sec)

mysql> show profile block io,cpu for query 2;

+--------------------------------+----------+----------+------------+--------------+---------------+

| Status             | Duration | CPU_user | CPU_system | Block_ops_in | Block_ops_out |

上一页  1 2 3 4 5 6 7  下一页

Tags:Mysql 教程 性能

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接