查看mysql执行时间
mysql的 profiling不是默认打开的
查看profiling是否找开
mysql> show variables like "%pro%";
+---------------------------+-------+
| Variable_name | Value |
+---------------------------+-------+
| profiling | OFF |
| profiling_history_size | 15 |
| protocol_version | 10 |
| slave_compressed_protocol | OFF |
+---------------------------+-------+
打开profiling
mysql> set profiling=1;
使用
mysql> show tables;+----------------+| Tables_in_test |+----------------+| test || user |+----------------+mysql> select * from test;mysql> show profiles;+----------+------------+------------------------+| Query_ID | Duration | Query |+----------+------------+------------------------+| 1 | 0.00054675 | show tables || 2 | 0.00032400 | select * from test |+----------+------------+------------------------+2 rows in set (0.00 sec) |
mysql> show profile for query 1;
+----------------------+-----------+
| Status | Duration |
+----------------------+-----------+
| (initialization) | 0.000028 |
| checking permissions | 0.000007 |
| Opening tables | 0.0000939 |
| System lock | 0.0000017 |
| Table lock | 0.0000055 |
| init | 0.000009 |
| optimizing | 0.0000027 |
| statistics | 0.0000085 |
| preparing | 0.0000065 |
| executing | 0.000004 |
| checking permissions | 0.000258 |
| Sending data | 0.000049 |
| end | 0.0000037 |
| query end | 0.0000027 |
| freeing items | 0.0000307 |
| closing tables | 0.0000032 |
| removing tmp table | 0.0000275 |
| closing tables | 0.0000037 |
| logging slow query | 0.000002 |
+----------------------+-----------+
19 rows in set (0.00 sec)
查看mysql执行时间的更多相关文章
- [mysql] 查看mysql执行时间
mysql的 profiling不是默认打开的 查看profiling是否找开 mysql> show variables like "%pro%"; +---------- ...
- 查看mysql中sql语句执行时间
查看mysql版本:select version();方法一: show profiles.1. Show profiles是5.0.37之后添加的,要想使用此功能,要确保版本在5.0.37之后. ...
- 查看mysql正在执行的SQL语句,使用profile分析SQL执行状态
http://qq85609655.iteye.com/blog/2113960 1)我们先通过status命令查看Mysql运行状态 mysql> status; -------------- ...
- 查看mysql数据库版本方法总结
当你接手某个mysql数据库管理时,首先你需要查看维护的mysql数据库版本:当开发人员问你mysql数据库版本时,而恰好你又遗忘了,那么此时也需要去查看mysql数据库的版本............ ...
- 关于如何查看MySQL版本:
方法一: 进入mysql cmd, status; 将显示当前mysql的version的各种信息. 方法二: 还是在mysql的cmd下,输入: select version(); 查看MySQL端 ...
- 查看mysql,apache,php,nginx编译参数
查看nginx编译参数: #/usr/local/nginx/sbin/nginx -V 查看mysql编译参数: cat /usr/local/mysql/bin/mysqlbug | grep ...
- 查看Mysql实时执行的Sql语句
最近给客户开发了基于Asp.Net mvc5 +Mysql+EF的项目,但是在EF里无法看到Mysql执行的语句 之前也找到一些监控Mysql的软件但一直没有用起来,现在又遇到了问题即在EF里Mysa ...
- 查看mysql表结构和表创建语句的方法(转)
查看mysql表结构的方法有三种:1.desc tablename;例如:要查看jos_modules表结构的命令:desc jos_modules;查看结果:mysql> desc jos_m ...
- 查看mysql语句运行时间
show profiles 之类的语句来查看 mysql> show profiles; Empty set mysql> show variables like "%pro%& ...
随机推荐
- PowerDNS + PowerDNS-Admin
一.基础配置 1.1 环境说明 Centos 7.5.1804 PDNS MariaDB 1.2 关闭防火墙和 selinux setenforce sed -i 's/SELINUX=enforci ...
- Linux下Ngnix的安装与配置
由于我的博客项目在8084端口,需要Nginx来转发一下端口,记录一下安装过程和踩过的小坑. 一.下载 wget http://nginx.org/download/nginx-1.12.2.tar. ...
- status 和 typedef
- NFS实现多服务器文件共享
服务器 1.安装所需的软件包 yum install -y rpc-bind nfs-utils 2.设为开机自启动 systemctl enable nfs systemctl enable rpc ...
- 如何配置这个maven仓库的源http://mvnrepository.com/repos
http://mvnrepository.com/repos 主要是ID .mirrorof.name 怎么配置,这个网站上有spring5.0的,别的仓库没有,我需要这个源. 原文地址:https: ...
- 华为交换机配置Telnet步骤
通过Telnet方式登录交换机进行设备查询管理为各网络管理员提供了便利,不需要成天拎着console线夹着笔记本蹲在机房里,只要在能连接到相应网络的电脑上Telnet连接即可. 前提条件是该交换机已经 ...
- Fiddler-在fiddlerscript中修改某个请求的请求头内容
1.进入 OnBeforeRequest函数 在里面添加如下代码 if(oSession.fullUrl.Contains("url")){// //headers中添加测试参数 ...
- P1347 排序 (拓扑排序,tarjan)
题目 P1347 排序 解析 打开一看拓扑排序,要判环. 三种情况 有环(存在矛盾) 没环但在拓扑排序时存在有两个及以上的点入度为0(关系无法确定) 除了上两种情况(关系可确定) 本来懒了一下,直接在 ...
- python入门基础 02
目录 1.while 2.字符串格式化 3.运算符 4.编码初始 总结 1.while # while -- 关键字 (死循环) # # if 条件: # 结果 # # while 条件: # 循环体 ...
- 图解HTTP(一)
第一章 了解Web及网络基础 1.为知识共享为规划Web,基本理念是:借助多文档之间相互关联(你中有我,我中有你)形成的超文本,连成客户想参阅的WWW(World Wide Web). 2.提出了3项 ...