Home > Database > Mysql Tutorial > [MySQL]通过Profiles查看create语句的执行时间消耗_MySQL

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

WBOY
Release: 2016-06-01 13:02:32
Original
986 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template