MySQL 5.7 跟踪优化器
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.12 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show variables like '%optimizer_trace%';
+------------------------------+----------------------------------------------------------------------------+
| Variable_name | Value |
+------------------------------+----------------------------------------------------------------------------+
| optimizer_trace | enabled=off,one_line=off |
| optimizer_trace_features | greedy_search=on,range_optimizer=on,dynamic_range=on,repeated_subselect=on |
| optimizer_trace_limit | 1 |
| optimizer_trace_max_mem_size | 16384 |
| optimizer_trace_offset | -1 |
+------------------------------+----------------------------------------------------------------------------+
5 rows in set (0.01 sec)
mysql> set optimizer_trace='enabled=on',end_markers_in_json=on;
Query OK, 0 rows affected (1.99 sec)
mysql> select * from fire.test;
+------+
| a |
+------+
| 20 |
+------+
1 row in set (0.00 sec)
mysql> select * from information_schema.optimizer_trace\G
*************************** 1. row ***************************
QUERY: select * from fire.test
TRACE: {
"steps": [
{
"join_preparation": {
"select#": 1,
"steps": [
{
"expanded_query": "/* select#1 */ select `fire`.`test`.`a` AS `a` from `fire`.`test`"
}
] /* steps */
} /* join_preparation */
},
{
"join_optimization": {
"select#": 1,
"steps": [
{
"table_dependencies": [
{
"table": "`fire`.`test`",
"row_may_be_null": false,
"map_bit": 0,
"depends_on_map_bits": [
] /* depends_on_map_bits */
}
] /* table_dependencies */
},
{
"rows_estimation": [
{
"table": "`fire`.`test`",
"table_scan": {
"rows": 1,
"cost": 1
} /* table_scan */
}
] /* rows_estimation */
},
{
"considered_execution_plans": [
{
"plan_prefix": [
] /* plan_prefix */,
"table": "`fire`.`test`",
"best_access_path": {
"considered_access_paths": [
{
"rows_to_scan": 1,
"access_type": "scan",
"resulting_rows": 1,
"cost": 1.2,
"chosen": true
}
] /* considered_access_paths */
} /* best_access_path */,
"condition_filtering_pct": 100,
"rows_for_plan": 1,
"cost_for_plan": 1.2,
"chosen": true
}
] /* considered_execution_plans */
},
{
"attaching_conditions_to_tables": {
"original_condition": null,
"attached_conditions_computation": [
] /* attached_conditions_computation */,
"attached_conditions_summary": [
{
"table": "`fire`.`test`",
"attached": null
}
] /* attached_conditions_summary */
} /* attaching_conditions_to_tables */
},
{
"refine_plan": [
{
"table": "`fire`.`test`"
}
] /* refine_plan */
}
] /* steps */
} /* join_optimization */
},
{
"join_execution": {
"select#": 1,
"steps": [
] /* steps */
} /* join_execution */
}
] /* steps */
}
MISSING_BYTES_BEYOND_MAX_MEM_SIZE: 0
INSUFFICIENT_PRIVILEGES: 0
1 row in set (0.00 sec)
最新文章
- iOS AFNetWorking 3.1 的网络解析
- HTC Vive开发笔记之手柄震动
- esxi安装全过程及基本配置
- 35 个免费创新的响应式 HTML5 模板
- MySQL基于mysqldump及lvmsnapshot备份恢复
- 【转】【iOS】导航栏那些事儿
- jquery.layout框架分割线
- 在32位Windows 8或Windows 7上安装Windows Phone 8 SDK
- 算法9-5:最大流算法的Java代码
- 记录Linux下安装elasticSearch时遇到的一些错误
- 在vim中使用zencoding/Emmet
- IdentityServer4实战 - JWT Issuer 详解
- A.01.09—模块的输出—PWM低端输出
- IntelliJ IDEA配置
- UVa 10905 - Children's Game 排序,题目没有说输入是int 难度: 0
- python 报错RuntimeError: dictionary changed size during iteration
- js高级-作用域链
- uwsgi+nginx+django生产环境部署
- docker(二)不管怎么样,先跑起来。运行一个samba,运行一个hello world。
- Spring工作原理与单例
热门文章
- 算法与数据结构3.3 calculator
- ZooKeeper server &;&;client
- Scrum 冲刺博客,项目总结
- 第五部分shell项目一监控脚本
- Android Camera多屏幕适配解决预览照片拉伸
- Codeforces VK Cup 2015 A.And Yet Another Bracket Sequence(后缀数组+平衡树+字符串)
- BZOJ1509 &; 洛谷4408:[NOI2003]逃学的小孩——题解
- [Leetcode] single number ii 找单个数
- BZOJ1597 土地购买 【dp + 斜率优化】
- 洛谷 P4556 [Vani有约会]雨天的尾巴 解题报告