PostgreSQL 名词理解EXPLAIN VERBOSE

Posted on 2012-12-13 12:22  JasmineLiu  阅读(2069)  评论(0编辑  收藏  举报

The result is displayed as text in the Data Output page, and graphically visualized on the Explain page. This enables you to find out how the query is parsed, optimized and executed. You can modify the degree of inspection by changing the Explain options for this in the Query menu. Please note that “EXPLAIN VERBOSE” can not be displayed graphically.

查询的结果会以文本的形式在数据输出中显示出来,并且在解释页面中以图形可视化的形式展现。这确保您能明显地看到查询的解析、优化和执行情况。您可以通过在查询菜单中为该查询更改解释选项来调整检验度。请注意“EXPLAIN VERBOSE”不能图形化的现实。

注意:EXPLAIN VERBOSE其实是查询过程的中间结果。

 

联系:  EXPLAIN [ ANALYZE ] [ VERBOSE ] 语句

mydb=# explain analyze verbose select t,x,y from cc where a=44 or b=77;
                                                 QUERY PLAN

--------------------------------------------------------------------------------
Bitmap Heap Scan on public.cc (cost=8.92..20.89 rows=3 width=77) (actual time=
42.875..76.650 rows=4 loops=1)
Output: t, x, y      verbose的内容
Recheck Cond: ((cc.a = 44) OR (cc.b = 77))
-> BitmapOr (cost=8.92..8.92 rows=3 width=0) (actual time=42.836..42.836 ro
ws=0 loops=1)
-> Bitmap Index Scan on apart_index (cost=0.00..4.32 rows=3 width=0)
(actual time=17.844..17.844 rows=4 loops=1)
Index Cond: (cc.a = 44)
-> Bitmap Index Scan on b_index (cost=0.00..4.60 rows=1 width=0) (act
ual time=24.988..24.988 rows=0 loops=1)
Index Cond: (cc.b = 77)
Total runtime: 76.699 ms       analyze的内容
(9 行记录)

 

Copyright © 2024 JasmineLiu
Powered by .NET 9.0 on Kubernetes