>  기사  >  데이터 베이스  >  [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으로 문의하세요.