Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
d8b482be
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,发现更多精彩内容 >>
提交
d8b482be
编写于
2月 14, 1999
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
optimizer cleanup.
上级
808a6df0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
43 deletion
+15
-43
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/allpaths.c
+14
-14
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/joinpath.c
+1
-29
未找到文件。
src/backend/optimizer/path/allpaths.c
浏览文件 @
d8b482be
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.3
3 1999/02/14 05:14:08
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.3
4 1999/02/14 05:27:11
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -162,7 +162,7 @@ static List *
find_join_paths
(
Query
*
root
,
List
*
outer_rels
,
int
levels_needed
)
{
List
*
x
;
List
*
new
_rels
=
NIL
;
List
*
joined
_rels
=
NIL
;
RelOptInfo
*
rel
;
/*******************************************
...
...
@@ -181,14 +181,14 @@ find_join_paths(Query *root, List *outer_rels, int levels_needed)
/*
* Determine all possible pairs of relations to be joined at this
* level. Determine paths for joining these relation pairs and
* modify '
new
_rels' accordingly, then eliminate redundant join
* modify '
joined
_rels' accordingly, then eliminate redundant join
* relations.
*/
new
_rels
=
make_new_rels_by_joins
(
root
,
outer_rels
);
joined
_rels
=
make_new_rels_by_joins
(
root
,
outer_rels
);
update_rels_pathlist_for_joins
(
root
,
new
_rels
);
update_rels_pathlist_for_joins
(
root
,
joined
_rels
);
merge_rels_with_same_relids
(
new
_rels
);
merge_rels_with_same_relids
(
joined
_rels
);
#if 0
/*
...
...
@@ -196,11 +196,11 @@ find_join_paths(Query *root, List *outer_rels, int levels_needed)
* rel, * consider doing pullup -- JMH
*/
if (XfuncMode != XFUNC_NOPULL && XfuncMode != XFUNC_OFF)
foreach(x,
new
_rels)
foreach(x,
joined
_rels)
xfunc_trypullup((RelOptInfo *) lfirst(x));
#endif
rels_set_cheapest
(
new
_rels
);
rels_set_cheapest
(
joined
_rels
);
if
(
BushyPlanFlag
)
{
...
...
@@ -211,10 +211,10 @@ find_join_paths(Query *root, List *outer_rels, int levels_needed)
* involves the join relation to the joininfo list of the
* other relation
*/
add_new_joininfos
(
root
,
new
_rels
,
outer_rels
);
add_new_joininfos
(
root
,
joined
_rels
,
outer_rels
);
}
foreach
(
x
,
new
_rels
)
foreach
(
x
,
joined
_rels
)
{
rel
=
(
RelOptInfo
*
)
lfirst
(
x
);
...
...
@@ -239,20 +239,20 @@ find_join_paths(Query *root, List *outer_rels, int levels_needed)
/*
* merge join rels if then contain the same list of base rels
*/
outer_rels
=
merge_joinrels
(
new
_rels
,
outer_rels
);
outer_rels
=
merge_joinrels
(
joined
_rels
,
outer_rels
);
root
->
join_rel_list
=
outer_rels
;
}
else
root
->
join_rel_list
=
new
_rels
;
root
->
join_rel_list
=
joined
_rels
;
if
(
!
BushyPlanFlag
)
outer_rels
=
new
_rels
;
outer_rels
=
joined
_rels
;
}
if
(
BushyPlanFlag
)
return
final_join_rels
(
outer_rels
);
else
return
new
_rels
;
return
joined
_rels
;
}
/*****************************************************************************
...
...
src/backend/optimizer/path/joinpath.c
浏览文件 @
d8b482be
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.2
4 1999/02/14 04:56:46
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.2
5 1999/02/14 05:27:12
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -66,8 +66,6 @@ update_rels_pathlist_for_joins(Query *root, List *joinrels)
{
List
*
mergeinfo_list
=
NIL
;
List
*
hashinfo_list
=
NIL
;
List
*
temp_list
=
NIL
;
List
*
path
=
NIL
;
List
*
j
;
foreach
(
j
,
joinrels
)
...
...
@@ -144,37 +142,11 @@ update_rels_pathlist_for_joins(Query *root, List *joinrels)
* 4. Consider paths where both outer and inner relations must be
* hashed before being joined.
*/
pathlist
=
add_pathlist
(
joinrel
,
pathlist
,
hash_inner_and_outer
(
joinrel
,
outerrel
,
innerrel
,
hashinfo_list
));
joinrel
->
pathlist
=
pathlist
;
/*
* 'OuterJoinCost is only valid when calling
* (match_unsorted_inner) with the same arguments as the previous
* invokation of (match_unsorted_outer), so clear the field before
* going on.
*/
temp_list
=
innerrel
->
pathlist
;
foreach
(
path
,
temp_list
)
{
/*
* XXX
*
* This gross hack is to get around an apparent optimizer bug on
* Sparc (or maybe it is a bug of ours?) that causes really
* wierd behavior.
*/
if
(
IsA_JoinPath
(
path
))
((
Path
*
)
lfirst
(
path
))
->
outerjoincost
=
(
Cost
)
0
;
/*
* do it iff it is a join path, which is not always true, esp
* since the base level
*/
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录