Mysql教程性能跟踪语句.doc

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Mysql教程性能跟踪语句

原文链接:/u/29134/showart_480834.html MYSQL5.0家族提供的性能跟踪器确实很爽。 要注意两点。 1、不过版本要在5.0.37之后 手册上介绍:(SHOW PROFILES and SHOW PROFILE were added in MySQL 5.0.37. ) Important Please note that the SHOW PROFILE and SHOW PROFILES functionality is part of the MySQL 5.0 Community Server only. 2、变量profiling是用户变量,每次都得重新启用。 以下是我做的一些实验。数据很明显,就不多解释了。 mysql use test Database changed mysql set profiling=1; Query OK, 0 rows affected (0.00 sec) mysql show tables; +----------------+ | Tables_in_test | +----------------+ | bag_item | | bag_user | | score | | t | +----------------+ 4 rows in set (0.03 sec) mysql select count(*) from t; +----------+ | count(*) | +----------+ | 2097152 | +----------+ 1 row in set (0.74 sec) mysql show profiles; +----------+------------+------------------------+ | Query_ID | Duration?? | Query????????????????? | +----------+------------+------------------------+ |??????? 1 | 0| show tables??????????? | |??????? 2 | 0|?select?count(*) from t | +----------+------------+------------------------+ 2 rows in set (0.00 sec) 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 | | loggi

您可能关注的文档

文档评论(0)

liudao + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档