内容简介: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 .
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Java 语言导学
Mary Campione Kalrath Alison Huml / 机械工业 / 2003-1 / 39.00元
《Java 语言导学(原书第3版)》既适合初学者,也适合有经验的程序员:新程序员通过从头到尾阅读《Java 语言导学(原书第3版)》可以得到最大的收获,包括按照第1章“起步”中的步骤说明编译和运行自己的第一个程序。有过程式语言(比如C)经验的程序员可能希望从Java编程语言的面向对象概念和特性开始学习。 有面向对象编程经验的程序员可能希望先学习更高级的内容。一起来看看 《Java 语言导学》 这本书的介绍吧!