查看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%& ...
随机推荐
- openshift 使用curl命令访问apiserver
openshift版本:openshift v3.6.173.0.5 使用oc(同kubectl)命令访问apiserver资源的时候,会使用到/root/.kube/config文件中使用的配置. ...
- Partition5:Partiton Scheme是否指定Next Used?
在SQL Server中,为Partition Scheme多次指定Next Used,不会出错,最后一次指定的FileGroup是Partition Scheme的Next Used,建议,在执行P ...
- python鸭子类型
“当看到一只鸟走起来像鸭子.游泳起来像鸭子.叫起来也像鸭子,那么这只鸟就能够被称为鸭子” python的鸭子类型的设计让python的诸多对象的分类和应用更加灵活,需要注意类型和对象的区别(pytho ...
- Java 的 WebSocket
1. WebSocket 是什么 一言以蔽之,WebSocket允许服务器「主动」给浏览器发消息,如教程演示截图,服务器会主动推送比特币价格给浏览器. 2. 为什么要用 WebSocket 实时获取服 ...
- (转) Python3—UnicodeEncodeError 'ascii' codec can't encode characters in position 0-1
(转)python(三):Python3-UnicodeEncodeError 'ascii' codec can't encode characters in position 0-1 python ...
- pandas-08 pd.cut()的功能和作用
pandas-08 pd.cut()的功能和作用 pd.cut()的作用,有点类似给成绩设定优良中差,比如:0-59分为差,60-70分为中,71-80分为优秀等等,在pandas中,也提供了这样一个 ...
- 【开发工具】- Idea.2018.02注册码激活
1.从下面地址下载一个jar包,名称是 JetbrainsCrack-3.1-release-enc.jar 下载地址: 链接: https://pan.baidu.com/s/1VZjklI3qh ...
- 【面试突击】- Java面试总则
Java基础 1.Map.Set.List集合差别及联系详解 2.HashSet类是如何实现添加元素保证不重复的 3.HashMap 是线程安全的吗,为什么不是线程安全的(最好画图说明多线程环境下不安 ...
- requests模块 高级应用
目录 requests模块 高级应用 HttpConnectinPool 问题解决 IP代理 简单使用代理 代理池 cookie的处理 页面中验证码识别 使用 multiprocessing.dumm ...
- 使用vue-router在页面之间传值及接收值
第一页 点击去第二页的时候进行传值直接贴代码看: <template> <div id="app"> <div><router-link ...