Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
4bf1d27f
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,体验更适合开发者的 AI 搜索 >>
提交
4bf1d27f
编写于
8月 13, 2019
作者:
S
Sambitesh Dash
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bump ORCA version
上级
c891c8ac
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
343 addition
and
380 deletion
+343
-380
concourse/tasks/compile_gpdb.yml
concourse/tasks/compile_gpdb.yml
+1
-1
config/orca.m4
config/orca.m4
+2
-2
configure
configure
+2
-2
depends/conanfile_orca.txt
depends/conanfile_orca.txt
+1
-1
src/test/regress/expected/dpe_optimizer.out
src/test/regress/expected/dpe_optimizer.out
+15
-18
src/test/regress/expected/gporca_optimizer.out
src/test/regress/expected/gporca_optimizer.out
+6
-9
src/test/regress/expected/indexjoin_optimizer.out
src/test/regress/expected/indexjoin_optimizer.out
+23
-25
src/test/regress/expected/join_gp_optimizer.out
src/test/regress/expected/join_gp_optimizer.out
+25
-32
src/test/regress/expected/join_optimizer.out
src/test/regress/expected/join_optimizer.out
+171
-188
src/test/regress/expected/subselect_gp_optimizer.out
src/test/regress/expected/subselect_gp_optimizer.out
+97
-102
未找到文件。
concourse/tasks/compile_gpdb.yml
浏览文件 @
4bf1d27f
...
...
@@ -19,4 +19,4 @@ params:
BLD_TARGETS
:
OUTPUT_ARTIFACT_DIR
:
gpdb_artifacts
CONFIGURE_FLAGS
:
ORCA_TAG
:
v3.6
3
.0
ORCA_TAG
:
v3.6
4
.0
config/orca.m4
浏览文件 @
4bf1d27f
...
...
@@ -40,10 +40,10 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <string.h>
]],
[
return strncmp("3.6
3
.", GPORCA_VERSION_STRING, 5);
return strncmp("3.6
4
.", GPORCA_VERSION_STRING, 5);
])],
[AC_MSG_RESULT([[ok]])],
[AC_MSG_ERROR([Your ORCA version is expected to be 3.6
3
.XXX])]
[AC_MSG_ERROR([Your ORCA version is expected to be 3.6
4
.XXX])]
)
AC_LANG_POP([C++])
])# PGAC_CHECK_ORCA_VERSION
...
...
configure
浏览文件 @
4bf1d27f
...
...
@@ -14017,7 +14017,7 @@ int
main ()
{
return strncmp("3.6
3
.", GPORCA_VERSION_STRING, 5);
return strncmp("3.6
4
.", GPORCA_VERSION_STRING, 5);
;
return 0;
...
...
@@ -14027,7 +14027,7 @@ if ac_fn_cxx_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
else
as_fn_error $? "Your ORCA version is expected to be 3.6
3
.XXX" "$LINENO" 5
as_fn_error $? "Your ORCA version is expected to be 3.6
4
.XXX" "$LINENO" 5
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
...
...
depends/conanfile_orca.txt
浏览文件 @
4bf1d27f
[requires]
orca/v3.6
3
.0@gpdb/stable
orca/v3.6
4
.0@gpdb/stable
[imports]
include, * -> build/include
...
...
src/test/regress/expected/dpe_optimizer.out
浏览文件 @
4bf1d27f
...
...
@@ -544,24 +544,21 @@ set enable_indexscan=on;
set enable_bitmapscan=off;
set enable_hashjoin=off;
explain select * from t, pt where tid = ptid and pt1 = 'hello0';
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..437.00 rows=1 width=50)
-> Hash Join (cost=0.00..437.00 rows=1 width=50)
Hash Cond: t.tid = pt.ptid
-> Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=19)
Hash Key: t.tid
-> Seq Scan on t (cost=0.00..431.00 rows=1 width=19)
-> Hash (cost=6.00..6.00 rows=1 width=31)
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..6.00 rows=1 width=31)
Hash Key: pt.ptid
-> Sequence (cost=0.00..6.00 rows=1 width=31)
-> Partition Selector for pt (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 6 (out of 6)
-> Dynamic Index Scan on pt (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=31)
Index Cond: pt1 = 'hello0'::text
Optimizer: Pivotal Optimizer (GPORCA) version 2.73.0
(15 rows)
QUERY PLAN
--------------------------------------------------------------------------------------------------------------
Hash Join (cost=0.00..437.00 rows=1 width=50)
Hash Cond: (t.tid = pt.ptid)
-> Gather Motion 3:1 (slice1; segments: 3) (cost=0.00..431.00 rows=2 width=19)
-> Seq Scan on t (cost=0.00..431.00 rows=1 width=19)
-> Hash (cost=6.00..6.00 rows=1 width=31)
-> Gather Motion 3:1 (slice2; segments: 3) (cost=0.00..6.00 rows=1 width=31)
-> Sequence (cost=0.00..6.00 rows=1 width=31)
-> Partition Selector for pt (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 6 (out of 6)
-> Dynamic Index Scan on pt (dynamic scan id: 1) (cost=0.00..6.00 rows=1 width=31)
Index Cond: (pt1 = 'hello0'::text)
Optimizer: Pivotal Optimizer (GPORCA) version 3.64.0
(12 rows)
select * from t, pt where tid = ptid and pt1 = 'hello0';
dist | tid | t1 | t2 | dist | pt1 | pt2 | pt3 | ptid
...
...
src/test/regress/expected/gporca_optimizer.out
浏览文件 @
4bf1d27f
...
...
@@ -10930,20 +10930,17 @@ FROM (SELECT *
QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=0.00..1293.00 rows=1 width=8)
-> Gather Motion 3:1 (slice
3
; segments: 3) (cost=0.00..1293.00 rows=1 width=8)
-> Gather Motion 3:1 (slice
2
; segments: 3) (cost=0.00..1293.00 rows=1 width=8)
-> Aggregate (cost=0.00..1293.00 rows=1 width=8)
-> Append (cost=0.00..1293.00 rows=2 width=1)
-> Result (cost=0.00..862.00 rows=1 width=1
1
)
-> Result (cost=0.00..862.00 rows=1 width=1)
-> Hash Left Join (cost=0.00..862.00 rows=1 width=3)
Hash Cond: tab_1.id::text = tab_2.id::text
-> Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=5)
Hash Key: tab_1.id
-> Seq Scan on tab_1 (cost=0.00..431.00 rows=1 width=5)
Hash Cond: ((tab_1.id)::text = (tab_2.id)::text)
-> Seq Scan on tab_1 (cost=0.00..431.00 rows=1 width=5)
-> Hash (cost=431.00..431.00 rows=1 width=7)
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=7)
Hash Key: tab_2.id::text
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=7)
-> Seq Scan on tab_2 (cost=0.00..431.00 rows=1 width=7)
-> Result (cost=0.00..431.00 rows=1 width=1
6
)
-> Result (cost=0.00..431.00 rows=1 width=1)
-> Seq Scan on tab_3 (cost=0.00..431.00 rows=1 width=8)
Optimizer: Pivotal Optimizer (GPORCA) version 2.70.2
(17 rows)
...
...
src/test/regress/expected/indexjoin_optimizer.out
浏览文件 @
4bf1d27f
...
...
@@ -27,31 +27,29 @@ WHERE tq.sym = tt.symbol AND
tt.event_ts < tq.end_ts
GROUP BY 1
ORDER BY 1 asc ;
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..878.21 rows=413 width=16)
Merge Key: (my_tt_agg_small.event_ts / 100000 / 5 * 5)
-> GroupAggregate (cost=0.00..878.19 rows=138 width=16)
Group By: (my_tt_agg_small.event_ts / 100000 / 5 * 5)
-> Sort (cost=0.00..878.19 rows=138 width=16)
Sort Key: (my_tt_agg_small.event_ts / 100000 / 5 * 5)
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..878.10 rows=138 width=16)
Hash Key: (my_tt_agg_small.event_ts / 100000 / 5 * 5)
-> Result (cost=0.00..878.09 rows=138 width=16)
-> HashAggregate (cost=0.00..878.09 rows=138 width=16)
Group By: my_tt_agg_small.event_ts / 100000 / 5 * 5
-> Result (cost=0.00..866.15 rows=94594 width=8)
-> Hash Join (cost=0.00..865.39 rows=94594 width=8)
Hash Cond: my_tq_agg_small.sym::bpchar = my_tt_agg_small.symbol
Join Filter: my_tt_agg_small.event_ts >= my_tq_agg_small.ets AND my_tt_agg_small.event_ts < my_tq_agg_small.end_ts
-> Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..431.10 rows=676 width=20)
Hash Key: my_tq_agg_small.sym::bpchar
-> Seq Scan on my_tq_agg_small (cost=0.00..431.02 rows=676 width=20)
-> Hash (cost=431.01..431.01 rows=140 width=25)
-> Seq Scan on my_tt_agg_small (cost=0.00..431.01 rows=140 width=25)
Settings: optimizer=on; optimizer_nestloop_factor=1
Optimizer status: Pivotal Optimizer (GPORCA) version 2.32.0
(22 rows)
QUERY PLAN
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..878.47 rows=413 width=16)
Merge Key: ((((my_tt_agg_small.event_ts / 100000) / 5) * 5))
-> GroupAggregate (cost=0.00..878.44 rows=138 width=16)
Group Key: ((((my_tt_agg_small.event_ts / 100000) / 5) * 5))
-> Sort (cost=0.00..878.44 rows=138 width=16)
Sort Key: ((((my_tt_agg_small.event_ts / 100000) / 5) * 5))
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..878.35 rows=138 width=16)
Hash Key: ((((my_tt_agg_small.event_ts / 100000) / 5) * 5))
-> Result (cost=0.00..878.34 rows=138 width=16)
-> HashAggregate (cost=0.00..878.34 rows=138 width=16)
Group Key: (((my_tt_agg_small.event_ts / 100000) / 5) * 5)
-> Result (cost=0.00..866.40 rows=94594 width=8)
-> Hash Join (cost=0.00..865.64 rows=94594 width=8)
Hash Cond: ((my_tq_agg_small.sym)::text = (my_tt_agg_small.symbol)::text)
Join Filter: ((my_tt_agg_small.event_ts >= my_tq_agg_small.ets) AND (my_tt_agg_small.event_ts < my_tq_agg_small.end_ts))
-> Seq Scan on my_tq_agg_small (cost=0.00..431.02 rows=676 width=20)
-> Hash (cost=431.30..431.30 rows=420 width=25)
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.30 rows=420 width=25)
-> Seq Scan on my_tt_agg_small (cost=0.00..431.01 rows=140 width=25)
Optimizer: Pivotal Optimizer (GPORCA) version 3.64.0
(20 rows)
SELECT (tt.event_ts / 100000) / 5 * 5 as fivemin, COUNT(*)
...
...
src/test/regress/expected/join_gp_optimizer.out
浏览文件 @
4bf1d27f
...
...
@@ -107,20 +107,17 @@ explain select count(*) from t1,t2 where t1.x = 100 and t1.x = t2.x;
QUERY PLAN
------------------------------------------------------------------------------------------------------------
Aggregate (cost=0.00..862.00 rows=1 width=8)
-> Gather Motion 3:1 (slice2; segments: 3) (cost=0.00..862.00 rows=1 width=8)
-> Aggregate (cost=0.00..862.00 rows=1 width=8)
-> Hash Join (cost=0.00..862.00 rows=1 width=1)
Hash Cond: t1.x = t2.x
-> Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=4)
Hash Key: t1.x
-> Seq Scan on t1 (cost=0.00..431.00 rows=1 width=4)
Filter: x = 100
-> Hash (cost=431.00..431.00 rows=1 width=4)
-> Seq Scan on t2 (cost=0.00..431.00 rows=1 width=4)
Filter: x = 100
Settings: optimizer=on
Optimizer status: Pivotal Optimizer (GPORCA) version 2.39.2
(14 rows)
-> Hash Join (cost=0.00..862.00 rows=1 width=1)
Hash Cond: (t1.x = t2.x)
-> Gather Motion 3:1 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=4)
-> Seq Scan on t1 (cost=0.00..431.00 rows=1 width=4)
Filter: (x = 100)
-> Hash (cost=431.00..431.00 rows=1 width=4)
-> Gather Motion 3:1 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=4)
-> Seq Scan on t2 (cost=0.00..431.00 rows=1 width=4)
Filter: (x = 100)
Optimizer: Pivotal Optimizer (GPORCA) version 3.64.0
(11 rows)
select count(*) from t1,t2 where t1.x = 100 and t1.x = t2.x;
count
...
...
@@ -156,24 +153,20 @@ select * from t1,t2 where t1.x = 100 and t2.x >= t1.x;
--
set optimizer_segments=2;
explain select * from t1,t2 where t1.x = 100 and t1.x = t2.y and t1.x <= t2.x;
QUERY PLAN
-------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..862.01 rows=1 width=24)
-> Hash Join (cost=0.00..862.01 rows=1 width=24)
Hash Cond: t1.x = t2.y
Join Filter: t1.x <= t2.x
-> Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
Hash Key: t1.x
-> Seq Scan on t1 (cost=0.00..431.00 rows=1 width=12)
Filter: x = 100
-> Hash (cost=431.00..431.00 rows=1 width=12)
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=12)
Hash Key: t2.y
-> Seq Scan on t2 (cost=0.00..431.00 rows=1 width=12)
Filter: y = 100
Settings: optimizer=on; optimizer_segments=2
Optimizer status: Pivotal Optimizer (GPORCA) version 2.39.2
(15 rows)
QUERY PLAN
-------------------------------------------------------------------------------------------
Hash Join (cost=0.00..862.01 rows=1 width=24)
Hash Cond: (t1.x = t2.y)
Join Filter: (t1.x <= t2.x)
-> Gather Motion 3:1 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Seq Scan on t1 (cost=0.00..431.00 rows=1 width=12)
Filter: (x = 100)
-> Hash (cost=431.00..431.00 rows=1 width=12)
-> Gather Motion 3:1 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Seq Scan on t2 (cost=0.00..431.00 rows=1 width=12)
Filter: (y = 100)
Optimizer: Pivotal Optimizer (GPORCA) version 3.64.0
(11 rows)
reset optimizer_segments;
select * from t1,t2 where t1.x = 100 and t1.x = t2.y and t1.x <= t2.x;
...
...
src/test/regress/expected/join_optimizer.out
浏览文件 @
4bf1d27f
此差异已折叠。
点击以展开。
src/test/regress/expected/subselect_gp_optimizer.out
浏览文件 @
4bf1d27f
...
...
@@ -718,31 +718,31 @@ select * from csq_pullup t0 where 1= (select count(*) from csq_pullup t1 where t
-- numeric, numeric
--
explain select * from csq_pullup t0 where 1= (select count(*) from csq_pullup t1 where t0.n=t1.n);
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3)
(cost=0.00..862.00 rows=1 width=17)
-> Result (cost=0.00..862.00 rows=1 width=17
)
Filter: 1 = COALESCE((count((count()))), 0::bigint
)
->
Result (cost=0.00..862.00 rows=1 width=36
)
-> Hash Left Join (cost=0.00..862.00 rows=1 width=25
)
Hash Cond: csq_pullup.n = csq_pullup_1.n
->
Redistribute Motion 3:3 (slice1; segments: 3)
(cost=0.00..431.00 rows=1 width=17)
Hash Key: csq_pullup.n
-> Seq Scan on csq_pullup (cost=0.00..431.00 rows=1 width=17
)
-> Hash (cost=431
.00..431.00 rows=1 width=13)
-> GroupAggregate (cost=0.00..431.00 rows=1 width=13)
Group Key: csq_pullup_1.n
-> Sort (cost=0.00..431.00 rows=1 width=13)
Sort Key: csq_pullup_1.n
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=13)
Hash Key: csq_pullup_1.n
-> Result (cost=0.00..431.00 rows=1 width=13)
-> GroupAggregate (cost=0.00..431.00 rows=1 width=13)
Group Key: csq_pullup_1.n
-> Sort (cost=0.00..431.00 rows=1 width=5)
Sort Key: csq_pullup_1.n
-> Seq Scan on csq_pullup csq_pullup_1 (cost=0.00..431.00 rows=1 width=5)
Optimizer: Pivotal Optimizer (GPORCA) version
2.7
4.0
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------
------
Result
(cost=0.00..862.00 rows=1 width=17)
Filter: (1 = COALESCE((count((count()))), 0::bigint)
)
-> Result (cost=0.00..862.00 rows=1 width=36
)
->
Hash Left Join (cost=0.00..862.00 rows=1 width=25
)
Hash Cond: (csq_pullup.n = csq_pullup_1.n
)
-> Gather Motion 3:1 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=17)
->
Seq Scan on csq_pullup
(cost=0.00..431.00 rows=1 width=17)
-> Hash (cost=431.00..431.00 rows=1 width=13)
-> Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..431.00 rows=1 width=13
)
-> Result (cost=0
.00..431.00 rows=1 width=13)
-> GroupAggregate (cost=0.00..431.00 rows=1 width=13)
Group Key: csq_pullup_1.n
-> Sort (cost=0.00..431.00 rows=1 width=13)
Sort Key: csq_pullup_1.n
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=13)
Hash Key: csq_pullup_1.n
-> Result (cost=0.00..431.00 rows=1 width=13)
-> GroupAggregate (cost=0.00..431.00 rows=1 width=13)
Group Key: csq_pullup_1.n
-> Sort (cost=0.00..431.00 rows=1 width=5)
Sort Key: csq_pullup_1.n
-> Seq Scan on csq_pullup csq_pullup_1 (cost=0.00..431.00 rows=1 width=5)
Optimizer: Pivotal Optimizer (GPORCA) version
3.6
4.0
(23 rows)
select * from csq_pullup t0 where 1= (select count(*) from csq_pullup t1 where t0.n=t1.n);
...
...
@@ -1816,90 +1816,85 @@ SELECT * FROM dedup_test1 INNER JOIN dedup_test2 ON dedup_test1.a= dedup_test2.e
-- Test planner to check if it optimizes the join and marks it as a dummy join
EXPLAIN SELECT * FROM dedup_test3, dedup_test1 WHERE c = 7 AND dedup_test3.b IN (SELECT b FROM dedup_test1);
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice4; segments: 3) (cost=0.00..1324463.71 rows=4 width=20)
-> Hash Semi Join (cost=0.00..1324463.71 rows=2 width=20)
Hash Cond: dedup_test3.b = dedup_test1_1.b
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..1324032.71 rows=2 width=20)
Hash Key: dedup_test3.b
-> Nested Loop (cost=0.00..1324032.71 rows=2 width=20)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Sequence (cost=0.00..431.00 rows=1 width=12)
-> Partition Selector for dedup_test3 (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 0 (out of 1)
-> Dynamic Seq Scan on dedup_test3 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=12)
Filter: c = 7
-> Seq Scan on dedup_test1 (cost=0.00..431.00 rows=2 width=8)
-> Hash (cost=431.00..431.00 rows=2 width=4)
-> Redistribute Motion 3:3 (slice3; segments: 3) (cost=0.00..431.00 rows=2 width=4)
Hash Key: dedup_test1_1.b
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..1324463.60 rows=4 width=20)
-> Hash Semi Join (cost=0.00..1324463.60 rows=2 width=20)
Hash Cond: (dedup_test3.b = dedup_test1_1.b)
-> Nested Loop (cost=0.00..1324032.60 rows=2 width=20)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Sequence (cost=0.00..431.00 rows=1 width=12)
-> Partition Selector for dedup_test3 (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 0 (out of 1)
-> Dynamic Seq Scan on dedup_test3 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=12)
Filter: (c = 7)
-> Seq Scan on dedup_test1 (cost=0.00..431.00 rows=2 width=8)
-> Hash (cost=431.00..431.00 rows=4 width=4)
-> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=4 width=4)
-> Seq Scan on dedup_test1 dedup_test1_1 (cost=0.00..431.00 rows=2 width=4)
Optimizer: Pivotal Optimizer (GPORCA) version 2.74.0
(19 rows)
EXPLAIN SELECT * FROM dedup_test3, dedup_test1 WHERE c = 7 AND dedup_test3.b IN (SELECT a FROM dedup_test1);
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..1324463.71 rows=4 width=20)
-> Hash Semi Join (cost=0.00..1324463.71 rows=2 width=20)
Hash Cond: dedup_test3.b = dedup_test1_1.a
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..1324032.71 rows=2 width=20)
Hash Key: dedup_test3.b
-> Nested Loop (cost=0.00..1324032.71 rows=2 width=20)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Sequence (cost=0.00..431.00 rows=1 width=12)
-> Partition Selector for dedup_test3 (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 0 (out of 1)
-> Dynamic Seq Scan on dedup_test3 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=12)
Filter: c = 7
-> Seq Scan on dedup_test1 (cost=0.00..431.00 rows=2 width=8)
-> Hash (cost=431.00..431.00 rows=2 width=4)
-> Seq Scan on dedup_test1 dedup_test1_1 (cost=0.00..431.00 rows=2 width=4)
Optimizer: Pivotal Optimizer (GPORCA) version 2.74.0
(17 rows)
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..1324463.60 rows=4 width=20)
-> Hash Semi Join (cost=0.00..1324463.60 rows=2 width=20)
Hash Cond: (dedup_test3.b = dedup_test1_1.a)
-> Nested Loop (cost=0.00..1324032.60 rows=2 width=20)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Sequence (cost=0.00..431.00 rows=1 width=12)
-> Partition Selector for dedup_test3 (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 0 (out of 1)
-> Dynamic Seq Scan on dedup_test3 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=12)
Filter: (c = 7)
-> Seq Scan on dedup_test1 (cost=0.00..431.00 rows=2 width=8)
-> Hash (cost=431.00..431.00 rows=4 width=4)
-> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..431.00 rows=4 width=4)
-> Seq Scan on dedup_test1 dedup_test1_1 (cost=0.00..431.00 rows=2 width=4)
Optimizer: Pivotal Optimizer (GPORCA) version 3.64.0
(16 rows)
EXPLAIN SELECT * FROM dedup_test3, dedup_test1 WHERE c = 7 AND EXISTS (SELECT b FROM dedup_test1) AND dedup_test3.b IN (SELECT b FROM dedup_test1);
QUERY PLAN
-----------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice6; segments: 3) (cost=0.00..2648064.92 rows=4 width=20)
-> Hash Join (cost=0.00..2648064.92 rows=2 width=20)
Hash Cond: dedup_test3.b = dedup_test1_2.b
-> Redistribute Motion 3:3 (slice2; segments: 3) (cost=0.00..1324032.71 rows=2 width=20)
Hash Key: dedup_test3.b
-> Nested Loop (cost=0.00..1324032.71 rows=2 width=20)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Sequence (cost=0.00..431.00 rows=1 width=12)
-> Partition Selector for dedup_test3 (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 0 (out of 1)
-> Dynamic Seq Scan on dedup_test3 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=12)
Filter: c = 7
-> Seq Scan on dedup_test1 (cost=0.00..431.00 rows=2 width=8)
-> Hash (cost=1324032.22..1324032.22 rows=2 width=4)
-> Nested Loop Semi Join (cost=0.00..1324032.22 rows=2 width=4)
Join Filter: true
-> GroupAggregate (cost=0.00..431.00 rows=2 width=4)
Group Key: dedup_test1_2.b
-> Sort (cost=0.00..431.00 rows=2 width=4)
Sort Key: dedup_test1_2.b
-> Redistribute Motion 3:3 (slice5; segments: 3) (cost=0.00..431.00 rows=2 width=4)
Hash Key: dedup_test1_2.b
-> GroupAggregate (cost=0.00..431.00 rows=2 width=4)
Group Key: dedup_test1_2.b
-> Sort (cost=0.00..431.00 rows=2 width=4)
Sort Key: dedup_test1_2.b
-> Seq Scan on dedup_test1 dedup_test1_2 (cost=0.00..431.00 rows=2 width=4)
-> Materialize (cost=0.00..431.00 rows=1 width=1)
-> Broadcast Motion 1:3 (slice4) (cost=0.00..431.00 rows=3 width=1)
-> Limit (cost=0.00..431.00 rows=1 width=1)
-> Gather Motion 3:1 (slice3; segments: 3) (cost=0.00..431.00 rows=1 width=1)
-> Limit (cost=0.00..431.00 rows=1 width=1)
-> Seq Scan on dedup_test1 dedup_test1_1 (cost=0.00..431.00 rows=2 width=1)
Optimizer: Pivotal Optimizer (GPORCA) version 2.74.0
(35 rows)
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------
Gather Motion 3:1 (slice6; segments: 3) (cost=0.00..2648064.82 rows=4 width=20)
-> Hash Join (cost=0.00..2648064.81 rows=2 width=20)
Hash Cond: (dedup_test3.b = dedup_test1_2.b)
-> Nested Loop (cost=0.00..1324032.60 rows=2 width=20)
Join Filter: true
-> Broadcast Motion 3:3 (slice1; segments: 3) (cost=0.00..431.00 rows=1 width=12)
-> Sequence (cost=0.00..431.00 rows=1 width=12)
-> Partition Selector for dedup_test3 (dynamic scan id: 1) (cost=10.00..100.00 rows=34 width=4)
Partitions selected: 0 (out of 1)
-> Dynamic Seq Scan on dedup_test3 (dynamic scan id: 1) (cost=0.00..431.00 rows=1 width=12)
Filter: (c = 7)
-> Seq Scan on dedup_test1 (cost=0.00..431.00 rows=2 width=8)
-> Hash (cost=1324032.22..1324032.22 rows=4 width=4)
-> Broadcast Motion 3:3 (slice5; segments: 3) (cost=0.00..1324032.22 rows=4 width=4)
-> Nested Loop Semi Join (cost=0.00..1324032.22 rows=2 width=4)
Join Filter: true
-> GroupAggregate (cost=0.00..431.00 rows=2 width=4)
Group Key: dedup_test1_2.b
-> Sort (cost=0.00..431.00 rows=2 width=4)
Sort Key: dedup_test1_2.b
-> Redistribute Motion 3:3 (slice4; segments: 3) (cost=0.00..431.00 rows=2 width=4)
Hash Key: dedup_test1_2.b
-> GroupAggregate (cost=0.00..431.00 rows=2 width=4)
Group Key: dedup_test1_2.b
-> Sort (cost=0.00..431.00 rows=2 width=4)
Sort Key: dedup_test1_2.b
-> Seq Scan on dedup_test1 dedup_test1_2 (cost=0.00..431.00 rows=2 width=4)
-> Materialize (cost=0.00..431.00 rows=1 width=1)
-> Broadcast Motion 1:3 (slice3) (cost=0.00..431.00 rows=3 width=1)
-> Limit (cost=0.00..431.00 rows=1 width=1)
-> Gather Motion 3:1 (slice2; segments: 3) (cost=0.00..431.00 rows=1 width=1)
-> Limit (cost=0.00..431.00 rows=1 width=1)
-> Seq Scan on dedup_test1 dedup_test1_1 (cost=0.00..431.00 rows=2 width=1)
Optimizer: Pivotal Optimizer (GPORCA) version 3.64.0
(34 rows)
-- start_ignore
DROP TABLE IF EXISTS dedup_test1;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录