PostgreSQL EXPLAIN glossary

栏目: IT技术 · 发布时间: 5年前

内容简介: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 .

Last updated: June 2020, PostgreSQL 12

Issue reports and suggestions are welcome, please get in touch .


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

复盘

复盘

陈中 / 机械工业出版社 / 2013-7-23 / 29

复盘是围棋中的一种学习方法,指的是在写完一盘棋之后,要重新摆一遍,看看哪里下得好,哪里下得不好,对下得好和不好的,都要进行分析和推演。 柳传志第一个将复盘引入到做事之中,成为联想三大方法论之一,在联想每一个重大决策的背后,都有复盘的身影。 本书完整系统讲述了复盘的内容,清晰了复盘的价值,给出了复盘的操作步骤,我们可以在自己的工作生活中,应用复盘的方法,向自己学习,随时随地的提高自己,把......一起来看看 《复盘》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器