ホームページ  >  記事  >  データベース  >  [MySQL]通过Profiles查看create语句的执行时间消耗_MySQL

[MySQL]通过Profiles查看create语句的执行时间消耗_MySQL

WBOY
WBOYオリジナル
2016-06-01 13:02:32937ブラウズ

一,查看profiles的状态值
1,查看profiles是否已经打开了,默认是不打开的。

mysql> show variables like '%pro%';

我查看一下profiles里面没有东西,所以公司服务器里面profile是没有打开的,我查看了一下mysql变量,果然是OFF的。

二,打开profiles,然后测试
1,开启profiles

2,check下状态值,果然已经开启了,为ON

3,测试

mysql> create table test_cpny.listed_cpny_fin_rpt_prd

mysql>

mysql>

5,再check

看来时间消耗在| Sending data | 29.96599 |上面啊!

补充于2014-09-16

profiling_history_size

The number of statements for which to maintain profiling information if <code class="literal">profiling is enabled. The default value is 15. The maximum value is 100. Setting the value to 0 effectively disables profiling. See Section 13.7.5.32, “<code class="literal">SHOW PROFILES Syntax”.

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。