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 .


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

查看所有标签

猜你喜欢:

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

The Java Language Specification, Java SE 7 Edition

The Java Language Specification, Java SE 7 Edition

James Gosling、Bill Joy、Guy L. Steele Jr.、Gilad Bracha、Alex Buckley / Addison-Wesley Professional / 2013-2-24 / USD 59.99

Written by the inventors of the technology, The Java(r) Language Specification, Java SE 7 Edition, is the definitive technical reference for the Java programming language. The book provides complete, ......一起来看看 《The Java Language Specification, Java SE 7 Edition》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

MD5 加密
MD5 加密

MD5 加密工具

SHA 加密
SHA 加密

SHA 加密工具