当前位置:网站首页>[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
边栏推荐
- 重建丢失的数据
- 从“校园贷”到“直播带货”,追风少年罗敏一直行走在风口浪尖
- 如何将EasyCVR平台RTSP接入的设备数据迁移到EasyNVR中?
- Another blast!Ali's popular MySQL advanced collection is open source, reaching P7
- 概率论的学习和整理--番外4: 关于各种平均数:算术平均数,几何平均数,调和平均数,以及加权平均数和平方平均数 (未完成)
- Js - 内置对象
- 基于DoS攻击能量分级的ICPS综合安全控制与通信协同设计
- Beijing, Shanghai and Guangzhou offline events丨The most unmissable technology gatherings at the end of the year are all gathered
- 作业7.29 目录相关函数和文件属性相关函数
- 多表联查的学习
猜你喜欢
随机推荐
和数集团:让智慧城市更智慧,让现实生活更美好
JS事件参数对象event
【ASP.NET Core】选项类的依赖注入
dolphinscheduler simple task definition and complex cross-node parameter transfer
These critical programs are missing or too old: ma
奇异值分解(SVD)原理与在降维中的应用(附带例题讲解)(纯理论)
即时通讯-改变社交与工作状态的新型软件
概率论的学习整理2:如何对随机实验的对象:“事件” 进行计数呢? 四种计数方法,不只是排列组合
Decoding Redis' most overlooked high CPU and memory usage issues
dbaplus丛书丨《MySQL DBA工作笔记》限量签名版来了!
[BJDCTF2020]Cookie is so stable-1|SSTI injection
【MySQL系列】-B+树索引和HASH索引有什么区别
unity对象池(学习)
Heshu Group: Make smart cities smarter and make real life better
C#实现软键盘的制作
基于柔性人机接口的人机协调运动控制方法
saltstack学习1入门基础
概率论的学习和整理7:理解期望和方差还是要回到随机试验本身,期望不是平均值,方差的公式不同情况不同
int a=8,a=a++,a? int b=8,b=b+1,b?
[ASP.NET Core] Dependency Injection for Option Classes









