Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
99eeb524
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
99eeb524
编写于
6月 07, 2018
作者:
L
Lisa Owen
提交者:
David Yozie
6月 07, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs - remove references to gp_partion_ functions (#5101)
上级
a9375827
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
29 deletion
+21
-29
gpdb-doc/dita/best_practices/tuning_queries.xml
gpdb-doc/dita/best_practices/tuning_queries.xml
+21
-29
未找到文件。
gpdb-doc/dita/best_practices/tuning_queries.xml
浏览文件 @
99eeb524
...
...
@@ -60,27 +60,28 @@
or nested loop join.
</p>
<p>
Following is an explain plan for a simple query. This query finds the number of rows in the
contributions table stored at each segment.
</p>
<codeblock
outputclass=
"language-sql"
>
gpa
cmin=# EXPLAIN SELECT gp_segment_id, count(*)
<codeblock
outputclass=
"language-sql"
>
gpa
dmin=# EXPLAIN SELECT gp_segment_id, count(*)
FROM contributions
GROUP BY gp_segment_id;
QUERY PLAN
--------------------------------------------------------------------------------
Gather Motion 2:1 (slice2; segments: 2) (cost=0.00..4.44 rows=4 width=16)
-> HashAggregate (cost=0.00..3.38 rows=4 width=16)
Group By: contributions.gp_segment_id
-> Redistribute Motion 2:2 (slice1; segments: 2)
(cost=0.00..2.12 rows=4 width=8)
Hash Key: contributions.gp_segment_id
-> Sequence (cost=0.00..1.09 rows=4 width=8)
-> Result (cost=10.00..100.00 rows=50 width=4)
-> Function Scan on gp_partition_expansion
(cost=10.00..100.00 rows=50 width=4)
-> Dynamic Table Scan on contributions (partIndex: 0)
(cost=0.00..0.03 rows=4 width=8)
Settings: optimizer=on
(10 rows)
</codeblock>
<p>
This plan has seven nodes
–
Dynamic Table Scan, Function Scan, Result, Sequence,
Redistribute Motion, HashAggregate, and finally Gather Motion. Each node contains three cost
QUERY PLAN
--------------------------------------------------------------------------------
Gather Motion 2:1 (slice2; segments: 2) (cost=0.00..431.00 rows=2 width=12)
-> GroupAggregate (cost=0.00..431.00 rows=1 width=12)
Group By: gp_segment_id
-> Sort (cost=0.00..431.00 rows=1 width=12)
Sort Key: gp_segment_id
-> Redistribute Motion 2:2 (slice1; segments: 2) (cost=0.00..431.00 rows=1 width=12)
Hash Key: gp_segment_id
-> Result (cost=0.00..431.00 rows=1 width=12)
-> GroupAggregate (cost=0.00..431.00 rows=1 width=12)
Group By: gp_segment_id
-> Sort (cost=0.00..431.00 rows=7 width=4)
Sort Key: gp_segment_id
-> Table Scan on table1 (cost=0.00..431.00 rows=7 width=4)
Optimizer status: PQO version 2.56.0
(14 rows)
</codeblock>
<p>
This plan has eight nodes
–
Table Scan, Sort, GroupAggregate, Result,
Redistribute Motion, Sort, GroupAggregate, and finally Gather Motion. Each node contains three cost
estimates: cost (in sequential page reads), the number of rows, and the width of the
rows.
</p>
<p>
The cost is a two-part estimate. A cost of 1.0 is equal to one sequential disk page read.
...
...
@@ -107,16 +108,7 @@
<li>
Bitmap Append-only Row-oriented Scan
—
gathers pointers to rows in an append-only
table from an index and sorts by location on disk.
</li>
<li>
Dynamic Table Scan
—
chooses partitions to scan using a partition selection
function. The Function Scan node contains the name of the partition selection function,
which can be one of the following:
<ul
id=
"ul_jzb_ntr_bp"
>
<li><codeph>
gp_partition_expansion
</codeph>
—
selects all partitions in the table.
No partitions are eliminated.
</li>
<li><codeph>
gp_partition_selection
</codeph>
—
chooses a partition based on an
equality expression.
</li>
<li><codeph>
gp_partition_inversion
</codeph>
—
chooses partitions based on a range
expression.
</li>
</ul>
The Function Scan node passes the dynamically selected list of partitions to the
Result node which is passed to the Sequence node.
</li>
function.
</li>
</ul>
<p>
Join operators include the following:
</p>
<ul>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录