内容简介:This tells us that Postgres would do aWe have documented many of the operations and field definitions you’re likely to come across while using EXPLAIN, along with performance advice and links to further learning resources.For advice in the context of your
EXPLAIN is the command used to request the execution plan for a query. It is incredibly useful when you want to explore what is going on, and see if there could be a more efficient way.
PostgreSQL does an amazing job populating query plans with useful information, but reading and understanding them can be tricky.
Here is a simple example:
Query ---------- explain select * from t order by c; Query plan ---------- Sort (cost=813.32..837.48 rows=9664 width=32) Sort Key: c -> Seq Scan on t (cost=0.00..173.64 rows=9664 width=32)
This tells us that Postgres would do a sequential scan of our table “t”, then a sort by column “c”. The numbers tell us the startup cost , the total cost , the plan rows , and the plan width at each stage.
We have documented many of the operations and field definitions you’re likely to come across while using EXPLAIN, along with performance advice and links to further learning resources.
For advice in the context of your query plans, check out our product pgMustard .
Main scan operations
Main join operations
All operations
-
CTE Scan
-
Named Tuplestore Scan
-
Sample Scan
-
TableFunc Scan
-
TID Scan
EXPLAIN parameters
Official docs
Further reading
Last updated: June 2020, PostgreSQL 12
Issue reports and suggestions are welcome, please get in touch .
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
现代应用数学手册
《现代应用数学手册》编委会 / 清华大学出版社 / 2005-1-1 / 48.00元
本书是进行科学计算的常备工具书,内容新颖,查阅方便,实用性强。主要介绍生产、科研、管理、数学等实践中在计算机上使用的各种计算方法和技巧。全书分为14章,依次为数值计算概论、插值法、函数逼近与曲线拟合、数值积分与数值微分、方程求根、线性方程组的直接解法和迭代解法、矩阵特征值问题、非线性方程组数值解与最优化方法、常微分方程初值问题和边值问题的数值解法、偏微分方程的数值解法、多重网络法和积分方程数值解法......一起来看看 《现代应用数学手册》 这本书的介绍吧!