当前位置:网站首页>Tidb implementation plan -- I
Tidb implementation plan -- I
2022-06-13 06:49:00 【Lao Wang's notes】
mysql> desc select a.name,a.age from student a inner join student2 b on a.age=b.age where a.age < 30;
+-----------------------------+-----------+-----------+-----------------------------+-------------------------------------------------------------+
| id | estRows | task | access object | operator info |
+-----------------------------+-----------+-----------+-----------------------------+-------------------------------------------------------------+
| HashJoin_23 | 29029.00 | root | | inner join, equal:[eq(test.student2.age, test.student.age)] |
| ├─IndexReader_28(Build) | 29029.00 | root | | index:IndexRangeScan_27 |
| │ └─IndexRangeScan_27 | 29029.00 | cop[tikv] | table:b, index:idx_age(age) | range:[-inf,30), keep order:false |
| └─TableReader_26(Probe) | 33294.82 | root | | data:Selection_25 |
| └─Selection_25 | 33294.82 | cop[tikv] | | lt(test.student.age, 30), not(isnull(test.student.age)) |
| └─TableFullScan_24 | 100185.00 | cop[tikv] | table:a | keep order:false |
+-----------------------------+-----------+-----------+-----------------------------+-------------------------------------------------------------+
6 rows in set (0.00 sec)- id: operator _id form , Different operators mean different things ; id Is the only one. ;
- estRows: Number of scan lines estimated from Statistics ;
- task: Operator belongs to task The type of , root task It means that tidb server Operator executed in , cop[tikv] It means that tikv The operator executed by the node , cop[tiflash] It means that tiflash Operator to execute ;
- access object: The data accessed by the operator is like information , Including table table, Table partitioning partition, And the index used index; Only operators that directly access the data have this information
- operator info: Other description information of the operator , Such as lt(test.student.age,30) Means filter less than Less than or equal to student surface age Field 30 The data of ;
EXPLAIN ANALYZE ...
mysql> explain analyze select a.name,a.age from student a inner join student2 b on a.age=b.age where a.age < 30\G
*************************** 1. row ***************************
id: HashJoin_21
estRows: 29029.00
actRows: 58058
task: root
access object:
execution info: time:12ms, loops:58, build_hash_table:{total:1.17ms, fetch:1.14ms, build:31.8µs}, probe:{concurrency:5, total:57.9ms, max:11.9ms, probe:50.3ms, fetch:7.57ms}
operator info: inner join, equal:[eq(test.student.age, test.student2.age)]
memory: 24.5 KB
disk: 0 Bytes
*************************** 2. row ***************************
id: ├─TableReader_24(Build)
estRows: 25654.88
actRows: 58
task: root
access object:
execution info: time:1.07ms, loops:2, cop_task: {num: 1, max: 1.22ms, proc_keys: 0, rpc_num: 1, rpc_time: 1.19ms, copr_cache_hit_ratio: 1.00}
operator info: data:Selection_23
memory: 2.09 KB
disk: N/A
*************************** 3. row ***************************
id: │ └─Selection_23
estRows: 25654.88
actRows: 58
task: cop[tikv]
access object:
execution info: tikv_task:{time:110ms, loops:102}
operator info: lt(test.student.age, 30), not(isnull(test.student.age))
memory: N/A
disk: N/A
*************************** 4. row ***************************
id: │ └─TableFullScan_22
estRows: 100185.00
actRows: 100098
task: cop[tikv]
access object: table:a
execution info: tikv_task:{time:104ms, loops:102}
operator info: keep order:false
memory: N/A
disk: N/A
*************************** 5. row ***************************
id: └─IndexReader_26(Probe)
estRows: 29029.00
actRows: 29029
task: root
access object:
execution info: time:1.47ms, loops:30, cop_task: {num: 1, max: 1.12ms, proc_keys: 0, rpc_num: 1, rpc_time: 1.1ms, copr_cache_hit_ratio: 1.00}
operator info: index:IndexRangeScan_25
memory: 227.4 KB
disk: N/A
*************************** 6. row ***************************
id: └─IndexRangeScan_25
estRows: 29029.00
actRows: 29029
task: cop[tikv]
access object: table:b, index:idx_age(age)
execution info: tikv_task:{time:30ms, loops:33}
operator info: range:[-inf,30), keep order:false
memory: N/A
disk: N/A
6 rows in set (0.02 sec)- estRows: Estimated number of rows based on Statistics ;
- actRows: Number of rows actually scanned
- execution info: Operator actual execution information ,time Represents the actual execution time of the operator ; If the operator is called more than once loops, This time is the cumulative time ; loops Indicates the number of calls ;
- memory : The amount of memory space occupied by the operator
- disk: The amount of disk space occupied by the operator
边栏推荐
- 数字时代进化论
- Unable to find method 'org gradle. api. artifacts. result. ComponentSelectionReason. getDesc
- Kotlin base generics
- Detailed explanation of the player startup process of ijkplayer code walkthrough 2
- How to use Wangyou DFM software for cold plate analysis
- What is the new business model of Taishan crowdfunding in 2022?
- Base64 principle
- 景联文科技提供一站式智能家居数据采集标注解决方案
- Jinglianwen technology provides a one-stop smart home data acquisition and labeling solution
- 'ipconfig' is not an internal or external command, nor is it a runnable program or batch file.
猜你喜欢

Differences between SQL and NoSQL of mongodb series

【微弱瞬态信号检测】混沌背景下微弱瞬态信号的SVM检测方法的matlab仿真

Jetpack - basic use of room

Data storage in memory (C language)
![[kernel] two methods of driver compilation: compiling into modules and compiling into the kernel (using miscellaneous device driver templates)](/img/7a/c8d5273e0a47d2d4b048a2905d0b16.png)
[kernel] two methods of driver compilation: compiling into modules and compiling into the kernel (using miscellaneous device driver templates)

数字时代进化论

Brief introduction to basic usage of echart

玄武云科技通过上市聆讯:业绩波动明显,陈永辉等三人为控股股东

JetPack - - - DataBinding

Why is the new e-commerce outlet mode so popular? What is the specific mode?
随机推荐
景联文科技:数据采集标注行业现状及解决方案
Common method of props changing value V-model sync
1154. 一年中的第几天
面试必刷算法TOP101之单调栈 TOP31
智能文娱稳步发展,景联文科技提供数据采集标注服务
If the key in redis data is in Chinese
What is the essence of social e-commerce disruption? How can businesses get more traffic?
package-lock. json
AIO Introduction (VIII)
Introduction to applet layout
Interface oriented programming in C language
Why does TCP establish three handshakes and four waves
Yolov5 analysis | parameters and performance indicators
髋关节MR详细图谱(转载)
【腾讯阿里最全面试题集锦】(四面:3轮技术+1轮HR)
JNI's bitmap grayscale image (rgba_8888 and rgb_565)
Chain 2+1 reward, what kind of mode is beautiful everyday seconds?
Brief introduction to basic usage of echart
Jinglianwen Technology: current situation and solutions of data annotation industry
Ijkplayer code walkthrough player network video data reading process details