Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
538f58c0
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,发现更多精彩内容 >>
提交
538f58c0
编写于
4月 18, 1997
作者:
V
Vadim B. Mikheev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#ifdef BTREE_BUILD_STATS enables to get executor stats for btree
building.
上级
d94c7fc4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
37 addition
and
17 deletion
+37
-17
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtree.c
+18
-14
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtsort.c
+19
-3
未找到文件。
src/backend/access/nbtree/nbtree.c
浏览文件 @
538f58c0
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.1
7 1997/03/24 08:48:11
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.1
8 1997/04/18 03:37:53
vadim Exp $
*
* NOTES
* This file contains only the public interface routines.
...
...
@@ -33,6 +33,12 @@
# include <string.h>
#endif
#ifdef BTREE_BUILD_STATS
#include <tcop/tcopprot.h>
extern
int
ShowExecutorStats
;
#endif
bool
BuildingBtree
=
false
;
/* see comment in btbuild() */
bool
FastBuild
=
true
;
/* use sort/build instead of insertion build */
...
...
@@ -77,10 +83,6 @@ btbuild(Relation heap,
bool
isunique
;
bool
usefast
;
#if 0
ResetBufferUsage();
#endif
/* note that this is a new btree */
BuildingBtree
=
true
;
...
...
@@ -95,6 +97,11 @@ btbuild(Relation heap,
*/
usefast
=
(
FastBuild
&&
IsNormalProcessingMode
());
#ifdef BTREE_BUILD_STATS
if
(
ShowExecutorStats
)
ResetUsage
();
#endif
/* see if index is unique */
isunique
=
IndexIsUniqueNoCache
(
RelationGetRelationId
(
index
));
...
...
@@ -278,18 +285,15 @@ btbuild(Relation heap,
_bt_spooldestroy
(
spool
);
}
#if 0
#ifdef BTREE_BUILD_STATS
if
(
ShowExecutorStats
)
{
extern int ReadBufferCount, BufferHitCount, BufferFlushCount;
extern long NDirectFileRead, NDirectFileWrite;
printf("buffer(%d): r=%d w=%d\n", heap->rd_rel->relblocksz,
ReadBufferCount - BufferHitCount, BufferFlushCount);
printf("direct(%d): r=%d w=%d\n", LocalBlockSize,
NDirectFileRead, NDirectFileWrite);
fprintf
(
stderr
,
"! BtreeBuild Stats:
\n
"
);
ShowUsage
();
ResetUsage
();
}
#endif
/*
* Since we just counted the tuples in the heap, we update its
* stats in pg_class to guarantee that the planner takes advantage
...
...
src/backend/access/nbtree/nbtsort.c
浏览文件 @
538f58c0
...
...
@@ -5,7 +5,7 @@
*
*
* IDENTIFICATION
* $Id: nbtsort.c,v 1.1
4 1997/04/16 01:48:2
7 vadim Exp $
* $Id: nbtsort.c,v 1.1
5 1997/04/18 03:37:5
7 vadim Exp $
*
* NOTES
*
...
...
@@ -63,6 +63,11 @@
# include <string.h>
#endif
#ifdef BTREE_BUILD_STATS
#include <tcop/tcopprot.h>
extern
int
ShowExecutorStats
;
#endif
/*
* turn on debugging output.
*
...
...
@@ -427,7 +432,7 @@ _bt_tapewrite(BTTapeBlock *tape, int eor)
{
tape
->
bttb_eor
=
eor
;
FileWrite
(
tape
->
bttb_fd
,
(
char
*
)
tape
,
TAPEBLCKSZ
);
NDirectFileWrite
+=
TAPEBLCKSZ
;
NDirectFileWrite
+=
TAPEBLCKSZ
/
MAXBLCKSZ
;
_bt_tapereset
(
tape
);
}
...
...
@@ -463,7 +468,7 @@ _bt_taperead(BTTapeBlock *tape)
return
(
0
);
}
Assert
(
tape
->
bttb_magic
==
BTTAPEMAGIC
);
NDirectFileRead
+=
TAPEBLCKSZ
;
NDirectFileRead
+=
TAPEBLCKSZ
/
MAXBLCKSZ
;
return
(
1
);
}
...
...
@@ -1366,5 +1371,16 @@ void
_bt_leafbuild
(
Relation
index
,
void
*
spool
)
{
_bt_isortcmpinit
(
index
,
(
BTSpool
*
)
spool
);
#ifdef BTREE_BUILD_STATS
if
(
ShowExecutorStats
)
{
fprintf
(
stderr
,
"! BtreeBuild (Spool) Stats:
\n
"
);
ShowUsage
();
ResetUsage
();
}
#endif
_bt_merge
(
index
,
(
BTSpool
*
)
spool
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录