Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
43f77c06
Commit
43f77c06
authored
Nov 26, 2003
by
Tatsuo Ishii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patches from Yutaka Tanida. Create primary key indexes after data
insertion to reduce initialization time.
parent
e7a45c78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
contrib/pgbench/README.pgbench
contrib/pgbench/README.pgbench
+5
-1
contrib/pgbench/README.pgbench_jis
contrib/pgbench/README.pgbench_jis
+6
-1
contrib/pgbench/pgbench.c
contrib/pgbench/pgbench.c
+22
-5
No files found.
contrib/pgbench/README.pgbench
View file @
43f77c06
pgbench README 200
2/07/20
Tatsuo Ishii (t-ishii@sra.co.jp)
pgbench README 200
3/11/26
Tatsuo Ishii (t-ishii@sra.co.jp)
o What is pgbench?
...
...
@@ -164,6 +164,10 @@ Basically it is same as BSD license. See pgbench.c for more details.
o History
2003/11/26
* create indexes after data insertion to reduce time.
patch from Yutaka Tanida.
2003/06/10
* fix uninitialized memory bug
* add support for PGHOST, PGPORT, PGUSER environment variables
...
...
contrib/pgbench/README.pgbench_jis
View file @
43f77c06
pgbench README 200
2/07/20
Tatsuo Ishii (t-ishii@sra.co.jp)
pgbench README 200
3/11/26
Tatsuo Ishii (t-ishii@sra.co.jp)
$B"#(Bpgbench $B$H$O!)(B
...
...
@@ -184,6 +184,11 @@ pgbench $B$O@P0f(B $BC#IW$K$h$C$F=q$+$l$^$7$?!%%i%$%;%s%9>r7o$O(B pgbench.c
$B"#2~DjMzNr(B
2003/11/26
* $BC+ED$5$s$N%Q%C%A$rE,MQ!%(Bpgbench -i$B$N:]$K!$8e$+$i<g%-!<$r:n@.(B
$B$9$k$h$&$K$7$?!%$3$l$K$h$C$F=i4|2=$N<B9T;~4V$,BgI}$KC;=L$G$-(B
$B$k(B($B$O$:(B)$B!%(B
2003/06/10
* $B%a%b%j$,=i4|2=$5$l$F$$$J$$%P%0$r=$@5(B
* $B4D6-JQ?t(BPGHOST, PGPORT, PGUSER$B$rG'<1$9$k$h$&$K$7$?!%(B
...
...
contrib/pgbench/pgbench.c
View file @
43f77c06
/*
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.2
7 2003/09/27 19:15:34 wieck
Exp $
* $Header: /cvsroot/pgsql/contrib/pgbench/pgbench.c,v 1.2
8 2003/11/26 06:53:18 ishii
Exp $
*
* pgbench: a simple TPC-B like benchmark program for PostgreSQL
* written by Tatsuo Ishii
*
* Copyright (c) 2000-200
2
Tatsuo Ishii
* Copyright (c) 2000-200
3
Tatsuo Ishii
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
...
...
@@ -482,13 +482,19 @@ init(void)
PGresult
*
res
;
static
char
*
DDLs
[]
=
{
"drop table branches"
,
"create table branches(bid int
, primary key(bid)
,bbalance int,filler char(88))"
,
"create table branches(bid int
not null
,bbalance int,filler char(88))"
,
"drop table tellers"
,
"create table tellers(tid int
, primary key(tid)
,bid int,tbalance int,filler char(84))"
,
"create table tellers(tid int
not null
,bid int,tbalance int,filler char(84))"
,
"drop table accounts"
,
"create table accounts(aid int
,primary key(aid)
,bid int,abalance int,filler char(84))"
,
"create table accounts(aid int
not null
,bid int,abalance int,filler char(84))"
,
"drop table history"
,
"create table history(tid int,bid int,aid int,delta int,mtime timestamp,filler char(22))"
};
static
char
*
DDLAFTERs
[]
=
{
"alter table branches add primary key (bid)"
,
"alter table tellers add primary key (tid)"
,
"alter table accounts add primary key (aid)"
};
char
sql
[
256
];
int
i
;
...
...
@@ -608,6 +614,17 @@ init(void)
#endif
/* NOT_USED */
}
}
fprintf
(
stderr
,
"set primary key...
\n
"
);
for
(
i
=
0
;
i
<
(
sizeof
(
DDLAFTERs
)
/
sizeof
(
char
*
));
i
++
)
{
res
=
PQexec
(
con
,
DDLAFTERs
[
i
]);
if
(
strncmp
(
DDLs
[
i
],
"drop"
,
4
)
&&
PQresultStatus
(
res
)
!=
PGRES_COMMAND_OK
)
{
fprintf
(
stderr
,
"%s"
,
PQerrorMessage
(
con
));
exit
(
1
);
}
PQclear
(
res
);
}
/* vacuum */
fprintf
(
stderr
,
"vacuum..."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment