当前位置:网站首页>[PostgreSQL] - explain SQL analysis introduction
[PostgreSQL] - explain SQL analysis introduction
2022-07-30 12:53:00 【prank】
一、Graphical online analysis tool
二、Execute the analysis statement
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON)
select * from ...生成分析JSON之后,Populate the Graphical Analysis page,进行分析.
三、分析样例
1、走索引 - Index Scan Node
Indicates that the secondary index goes first,Then go one level index to find the data
finds relevant records based on an Index. Index Scans perform 2 read operations: one to read the index and another to read the actual value from the table.
2、顺序扫描 - Seq Scan Node
finds relevant records by sequentially scanning the input record set. When reading from a table, Seq Scans (unlike Index Scans) perform a single read operation (only the table is read).
3、缓存 - shared
- Hit - 命中
- Read - 读磁盘
- Dirtied - 脏页(Dirty pages are contained inHit中)
4、循环匹配 - Nested Loop
join数据,Concatenate the two result sets
merges two record sets by looping through every record in the first set and trying to find a match in the second set. All matching records are returned.
遍历模式
索引模式
5、聚合 - Aggregate
group by 操作
groups records together based on a GROUP BY or aggregate function (like sum()).
6、排序 - Sort
order by 操作
sorts a record set based on the specified sort key.
7、数量限制 - limit
returns a specified number of rows from a record set.
8、with as 临时表 - Common table expressions - CTE
performs a sequential scan of Common Table Expression (CTE) query results. Note that results of a CTE are materialized (calculated and temporarily stored). on common table expressions(CTE)Query results perform a sequential scan.注意,CTEThe result is concrete(Calculate and store temporarily).
9、其他操作
- WindowAgg
- Subquery Scan
10、其他join模式图解
- Hash Join
- Merge Join
边栏推荐
- 奇异值分解(SVD)原理与在降维中的应用(附带例题讲解)(纯理论)
- 13-GuliMall 基础篇总结
- 概率论的学习整理4:全概率公式
- dolphinscheduler简单任务定义及复杂的跨节点传参
- Unity Beginner 6 - Simple UI production (blood bar production) and audio addition and NPC dialogue bubbles (2d)
- 概率论的学习整理5:贝叶斯(bayes)法则和贝叶斯概率
- JS事件参数对象event
- 历时两月,终拿字节跳动offer,算法面试题分享「带答案」
- Using Baidu EasyDL to realize the recognition of the chef's hat of the bright kitchen
- 概率论得学习和整理6:概率的分布
猜你喜欢
随机推荐
WinForm枚举容器中的控件,实现控件统一事件处理机制
基于柔性人机接口的人机协调运动控制方法
Unity Beginner 6 - Simple UI production (blood bar production) and audio addition and NPC dialogue bubbles (2d)
手慢无!阿里亿级流量高并发系统设计核心原理全彩笔记现实开源
并行化快速排序设想
dbaplus丛书丨《MySQL DBA工作笔记》限量签名版来了!
RTSP/Onvif协议视频平台EasyNVR服务一键升级功能的使用教程
作业7.29 目录相关函数和文件属性相关函数
MySQL【多表查询】
结合实战,浅析GB/T28181(三)——实况点播
Breaking the principle and introducing SQL, what does MongoDB want to do???
力扣——15. 三数之和
【Kaggle:UW-Madison GI Tract Image Segmentation】肠胃分割比赛:赛后复盘+数据再理解
为什么说Prometheus是足以取代Zabbix的监控神器?
物理服务器与虚拟机:主要区别和相似之处
概率论的学习整理3: 概率的相关概念
【语音识别】基于GMM-HMM的语音识别系统
[ASP.NET Core] Dependency Injection for Option Classes
看了这些6G原型样机,我想一觉睡到2030年
微信视频号视频如何下载提取?视频号直播回放如何下载?方法很简单!








![[SCTF2019]Flag Shop](/img/26/20e21ec873f41f2633703216453a44.png)