Maison  >  Article  >  base de données  >  [MySQL]通过Profiles查看create语句的执行时间消耗_MySQL

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

WBOY
WBOYoriginal
2016-06-01 13:02:32937parcourir

一,查看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”.

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn