summaryrefslogtreecommitdiff
path: root/src/test/bench
diff options
context:
space:
mode:
authorMarc G. Fournier1996-07-09 06:22:35 +0000
committerMarc G. Fournier1996-07-09 06:22:35 +0000
commitd31084e9d1118b25fd16580d9d8c2924b5740dff (patch)
tree3179e66307d54df9c7b966543550e601eb55e668 /src/test/bench
Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01
Diffstat (limited to 'src/test/bench')
-rw-r--r--src/test/bench/Makefile62
-rw-r--r--src/test/bench/WISC-README28
-rwxr-xr-xsrc/test/bench/create.sh24
-rw-r--r--src/test/bench/create.source17
-rw-r--r--src/test/bench/perquery12
-rw-r--r--src/test/bench/query014
-rw-r--r--src/test/bench/query024
-rw-r--r--src/test/bench/query034
-rw-r--r--src/test/bench/query044
-rw-r--r--src/test/bench/query054
-rw-r--r--src/test/bench/query064
-rw-r--r--src/test/bench/query072
-rw-r--r--src/test/bench/query082
-rw-r--r--src/test/bench/query094
-rw-r--r--src/test/bench/query104
-rw-r--r--src/test/bench/query114
-rw-r--r--src/test/bench/query124
-rw-r--r--src/test/bench/query134
-rw-r--r--src/test/bench/query144
-rw-r--r--src/test/bench/query154
-rw-r--r--src/test/bench/query164
-rw-r--r--src/test/bench/query174
-rw-r--r--src/test/bench/query184
-rw-r--r--src/test/bench/query194
-rw-r--r--src/test/bench/query204
-rw-r--r--src/test/bench/query210
-rw-r--r--src/test/bench/query220
-rw-r--r--src/test/bench/query234
-rw-r--r--src/test/bench/query240
-rw-r--r--src/test/bench/query250
-rw-r--r--src/test/bench/query262
-rw-r--r--src/test/bench/query272
-rw-r--r--src/test/bench/query282
-rw-r--r--src/test/bench/query292
-rw-r--r--src/test/bench/query302
-rw-r--r--src/test/bench/query312
-rw-r--r--src/test/bench/query322
-rwxr-xr-xsrc/test/bench/runwisc.sh17
-rwxr-xr-xsrc/test/bench/wholebench.sh5
39 files changed, 259 insertions, 0 deletions
diff --git a/src/test/bench/Makefile b/src/test/bench/Makefile
new file mode 100644
index 00000000000..65e612b73d2
--- /dev/null
+++ b/src/test/bench/Makefile
@@ -0,0 +1,62 @@
+#-------------------------------------------------------------------------
+#
+# Makefile--
+# Makefile for the Wisconsin Benchmark
+#
+# Copyright (c) 1994-5, Regents of the University of California
+#
+#
+# IDENTIFICATION
+# $Header: /cvsroot/pgsql/src/test/bench/Attic/Makefile,v 1.1.1.1 1996/07/09 06:22:21 scrappy Exp $
+#
+#-------------------------------------------------------------------------
+
+MKDIR= ../../mk
+include $(MKDIR)/postgres.mk
+
+
+CREATEFILES= create.sql bench.sql
+
+include $(MKDIR)/postgres.user.mk
+
+
+OUTFILES= bench.out bench.out.perquery
+CLEANFILES+= $(CREATEFILES) $(OUTFILES)
+
+bench.sql:
+ cat > $(objdir)/$@ < /dev/null
+ x=1; \
+ for i in `ls query[0-9][0-9]`; do \
+ echo "select $$x as x" >> $(objdir)/$@; \
+ cat $$i >> $(objdir)/$@; \
+ x=`expr $$x + 1`; \
+ done
+
+bench2.pq:
+ cat > ${.TARGET} < /dev/null
+ C=`pwd`; cd ${.CURDIR}; \
+ for i in 1 2 3 4 5 6; do \
+ echo "select timeofday();" >> $$C/${.TARGET}; \
+ done; \
+ x=1; \
+ for i in `ls query[0-9][0-9]`; do \
+ echo "select $$x as x;" >> $$C/${.TARGET}; \
+ echo "select timeofday();" >> $$C/${.TARGET}; \
+ cat $$i >> $$C/${.TARGET}; \
+ echo "select timeofday();" >> $$C/${.TARGET}; \
+ x=`expr $$x + 1`; \
+ done
+
+bench.out: $(CREATEFILES)
+ $(SHELL) ./create.sh && \
+ $(SHELL) ./runwisc.sh > $(objdir)/$@ 2>&1
+ @echo "RESULTS OF BENCHMARK ARE SAVED IN ${MAKEOBJDIR}/bench.out";
+
+bench.out.perquery: bench.out
+ $(SHELL) ./perquery < $(objdir)/bench.out 2>&1 > $@
+ @echo "BREAKDOWN OF BENCHMARK IS SAVED IN ${MAKEOBJDIR}/bench.out.perquery";
+
+all:: $(CREATEFILES)
+ rm -f $(OUTFILES)
+
+runtest: ${OUTFILES}
diff --git a/src/test/bench/WISC-README b/src/test/bench/WISC-README
new file mode 100644
index 00000000000..7142802f927
--- /dev/null
+++ b/src/test/bench/WISC-README
@@ -0,0 +1,28 @@
+The Postgres Wisconsin Benchmark
+
+In this directory are the queries and raw data files used to populate the
+Postgres version of the Wisconsin benchmark. In order to run the benchmark,
+you'll initially need to execute the script
+
+./create.sh
+
+which will populate the "bench" database, create the indices, and vacuum the
+database. This will take from 10 minutes or so on a Sparc II/DECstation 5000
+class machine to an hour on a Sun 3.
+
+Once create.sh completes, you can execute the benchmark by running the
+script
+
+./runwisc.sh
+
+into an output file. This output file may be quite large (300K or so)
+so make sure you have sufficient disk space. Once the benchmark run has
+completed, query execution times can be obtained by running the
+
+./perquery
+
+script on the output file. It will generate a nicely formatted, numbered
+set of output with times for each query indicated. (Note that each query
+is run twice.)
+
+ !!! WARNING! DO NOT RUN THESE SCRIPTS IF THE POSTMASTER IS RUNNING !!!
diff --git a/src/test/bench/create.sh b/src/test/bench/create.sh
new file mode 100755
index 00000000000..57563d8d4a5
--- /dev/null
+++ b/src/test/bench/create.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# $Header: /cvsroot/pgsql/src/test/bench/Attic/create.sh,v 1.1.1.1 1996/07/09 06:22:21 scrappy Exp $
+#
+if [ -d ./obj ]; then
+ cd ./obj
+fi
+
+echo =============== destroying old bench database... =================
+echo "drop database bench" | postgres template1 > /dev/null
+
+echo =============== creating new bench database... =================
+echo "create database bench" | postgres template1 > /dev/null
+if [ $? -ne 0 ]; then
+ echo createdb failed
+ exit 1
+fi
+
+postgres -Q bench < create.sql > /dev/null
+if [ $? -ne 0 ]; then
+ echo initial database load failed
+ exit 1
+fi
+
+exit 0
diff --git a/src/test/bench/create.source b/src/test/bench/create.source
new file mode 100644
index 00000000000..986ff3cf6c0
--- /dev/null
+++ b/src/test/bench/create.source
@@ -0,0 +1,17 @@
+create table onek(unique1 int4,unique2 int4,two int4,four int4,ten int4,twenty int4, hundred int4,thousand int4,twothousand int4,fivethous int4,tenthous int4,odd int4, even int4,stringu1 char16,stringu2 char16,string4 char16);
+create table tenk1 (unique1 int4,unique2 int4, two int4,four int4,ten int4,twenty int4,hundred int4,thousand int4,twothousand int4,fivethous int4,tenthous int4,odd int4,even int4,stringu1 char16,stringu2 char16,string4 char16);
+create table tenk2 (unique1 int4, unique2 int4, two int4, four int4,ten int4, twenty int4, hundred int4, thousand int4, twothousand int4,fivethous int4, tenthous int4, odd int4, even int4,stringu1 char16,stringu2 char16, string4 char16);
+copy onek from '_CWD_/../regress/data/onek.data';
+copy tenk1 from '_CWD_/../regress/data/tenk.data';
+copy tenk2 from '_CWD_/../regress/data/tenk.data';
+create index onek_unique1 on onek using btree(unique1 int4_ops);
+create index onek_unique2 on onek using btree(unique2 int4_ops);
+create index onek_hundred on onek using btree(hundred int4_ops);
+create index tenk1_unique1 on tenk1 using btree(unique1 int4_ops);
+create index tenk1_unique2 on tenk1 using btree(unique2 int4_ops);
+create index tenk1_hundred on tenk1 using btree(hundred int4_ops);
+create index tenk2_unique1 on tenk2 using btree(unique1 int4_ops);
+create index tenk2_unique2 on tenk2 using btree(unique2 int4_ops);
+create index tenk2_hundred on tenk2 using btree(hundred int4_ops);
+select * into table Bprime from tenk1 t where t.unique2 < 1000;
+vacuum;
diff --git a/src/test/bench/perquery b/src/test/bench/perquery
new file mode 100644
index 00000000000..4f0ba03ce61
--- /dev/null
+++ b/src/test/bench/perquery
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+egrep 'x = "|elapse' > /tmp/foo$$
+
+awk 'BEGIN { x = 0; y = 0; z = 0; a = 0; } \
+ /.*elapse.*/ {x = $2 + x; y = $4 + y; z = $6 + z;} \
+ /.*x = ".*/ { \
+ printf "query %2d: %7.3f real %7.3f user %7.3f sys\n", a, x, y, z; \
+ x = 0; y = 0; z = 0; a = a + 1; } \
+ END {printf("query %2d: %7.3f real %7.3f user %7.3f sys\n", a, x, y, z);}' \
+ < /tmp/foo$$
+
diff --git a/src/test/bench/query01 b/src/test/bench/query01
new file mode 100644
index 00000000000..0ed3a7b1e58
--- /dev/null
+++ b/src/test/bench/query01
@@ -0,0 +1,4 @@
+select * into table temp from tenk1 where (unique2 > 301) and (unique2 < 402);
+drop table temp;
+select * into table temp from tenk1 where (unique2 > 301) and (unique2 < 402);
+drop table temp;
diff --git a/src/test/bench/query02 b/src/test/bench/query02
new file mode 100644
index 00000000000..2d253ac1efa
--- /dev/null
+++ b/src/test/bench/query02
@@ -0,0 +1,4 @@
+select * into table temp from tenk1 where (unique1 > 647) and (unique1 < 1648);
+drop table temp;
+select * into table temp from tenk1 where (unique1 > 647) and (unique1 < 1648);
+drop table temp;
diff --git a/src/test/bench/query03 b/src/test/bench/query03
new file mode 100644
index 00000000000..0ed3a7b1e58
--- /dev/null
+++ b/src/test/bench/query03
@@ -0,0 +1,4 @@
+select * into table temp from tenk1 where (unique2 > 301) and (unique2 < 402);
+drop table temp;
+select * into table temp from tenk1 where (unique2 > 301) and (unique2 < 402);
+drop table temp;
diff --git a/src/test/bench/query04 b/src/test/bench/query04
new file mode 100644
index 00000000000..2d253ac1efa
--- /dev/null
+++ b/src/test/bench/query04
@@ -0,0 +1,4 @@
+select * into table temp from tenk1 where (unique1 > 647) and (unique1 < 1648);
+drop table temp;
+select * into table temp from tenk1 where (unique1 > 647) and (unique1 < 1648);
+drop table temp;
diff --git a/src/test/bench/query05 b/src/test/bench/query05
new file mode 100644
index 00000000000..0ed3a7b1e58
--- /dev/null
+++ b/src/test/bench/query05
@@ -0,0 +1,4 @@
+select * into table temp from tenk1 where (unique2 > 301) and (unique2 < 402);
+drop table temp;
+select * into table temp from tenk1 where (unique2 > 301) and (unique2 < 402);
+drop table temp;
diff --git a/src/test/bench/query06 b/src/test/bench/query06
new file mode 100644
index 00000000000..209c1321e60
--- /dev/null
+++ b/src/test/bench/query06
@@ -0,0 +1,4 @@
+select * into table temp from tenk1 where (unique2 > 647) and (unique2 < 1648);
+drop table temp;
+select * into table temp from tenk1 where (unique2 > 647) and (unique2 < 1648);
+drop table temp;
diff --git a/src/test/bench/query07 b/src/test/bench/query07
new file mode 100644
index 00000000000..ae8fccb3c05
--- /dev/null
+++ b/src/test/bench/query07
@@ -0,0 +1,2 @@
+select * from tenk1 where unique2 = 2001;
+select * from tenk1 where unique2 = 2001;
diff --git a/src/test/bench/query08 b/src/test/bench/query08
new file mode 100644
index 00000000000..531064829bc
--- /dev/null
+++ b/src/test/bench/query08
@@ -0,0 +1,2 @@
+select * from tenk1 where (unique2 > 301) and (unique2 < 402);
+select * from tenk1 where (unique2 > 301) and (unique2 < 402);
diff --git a/src/test/bench/query09 b/src/test/bench/query09
new file mode 100644
index 00000000000..66d33ca1ad4
--- /dev/null
+++ b/src/test/bench/query09
@@ -0,0 +1,4 @@
+select t1.*, t2.unique1 AS t2unique1, t2.unique2 AS t2unique2, t2.two AS t2two, t2.four AS t2four, t2.ten AS t2ten, t2.twenty AS t2twenty, t2.hundred AS t2hundred, t2.thousand AS t2thousand, t2.twothousand AS t2twothousand, t2.fivethous AS t2fivethous, t2.tenthous AS t2tenthous, t2.odd AS t2odd, t2.even AS t2even, t2.stringu1 AS t2stringu1, t2.stringu2 AS t2stringu2, t2.string4 AS t2string4 into table temp from tenk1 t1, tenk1 t2 where (t1.unique2 = t2.unique2) and (t2.unique2 < 1000);
+drop table temp;
+select t1.*, t2.unique1 AS t2unique1, t2.unique2 AS t2unique2, t2.two AS t2two, t2.four AS t2four, t2.ten AS t2ten, t2.twenty AS t2twenty, t2.hundred AS t2hundred, t2.thousand AS t2thousand, t2.twothousand AS t2twothousand, t2.fivethous AS t2fivethous, t2.tenthous AS t2tenthous, t2.odd AS t2odd, t2.even AS t2even, t2.stringu1 AS t2stringu1, t2.stringu2 AS t2stringu2, t2.string4 AS t2string4 into table temp from tenk1 t1, tenk1 t2 where (t1.unique2 = t2.unique2) and (t2.unique2 < 1000);
+drop table temp;
diff --git a/src/test/bench/query10 b/src/test/bench/query10
new file mode 100644
index 00000000000..de372aa6472
--- /dev/null
+++ b/src/test/bench/query10
@@ -0,0 +1,4 @@
+select t.*,B.unique1 AS Bunique1,B.unique2 AS Bunique2,B.two AS Btwo,B.four AS Bfour,B.ten AS Bten,B.twenty AS Btwenty,B.hundred AS Bhundred,B.thousand AS Bthousand,B.twothousand AS Btwothousand,B.fivethous AS Bfivethous,B.tenthous AS Btenthous,B.odd AS Bodd,B.even AS Beven,B.stringu1 AS Bstringu1,B.stringu2 AS Bstringu2,B.string4 AS Bstring4 into table temp from tenk1 t, Bprime B where t.unique2 = B.unique2;
+drop table temp;
+select t.*,B.unique1 AS Bunique1,B.unique2 AS Bunique2,B.two AS Btwo,B.four AS Bfour,B.ten AS Bten,B.twenty AS Btwenty,B.hundred AS Bhundred,B.thousand AS Bthousand,B.twothousand AS Btwothousand,B.fivethous AS Bfivethous,B.tenthous AS Btenthous,B.odd AS Bodd,B.even AS Beven,B.stringu1 AS Bstringu1,B.stringu2 AS Bstringu2,B.string4 AS Bstring4 into table temp from tenk1 t, Bprime B where t.unique2 = B.unique2;
+drop table temp;
diff --git a/src/test/bench/query11 b/src/test/bench/query11
new file mode 100644
index 00000000000..abbce829a84
--- /dev/null
+++ b/src/test/bench/query11
@@ -0,0 +1,4 @@
+select t1.*,o.unique1 AS ounique1,o.unique2 AS ounique2,o.two AS otwo,o.four AS ofour,o.ten AS oten,o.twenty AS otwenty,o.hundred AS ohundred,o.thousand AS othousand,o.twothousand AS otwothousand,o.fivethous AS ofivethous,o.tenthous AS otenthous,o.odd AS oodd, o.even AS oeven,o.stringu1 AS ostringu1,o.stringu2 AS ostringu2,o.string4 AS ostring4 into table temp from onek o, tenk1 t1, tenk1 t2 where (o.unique2 = t1.unique2) and (t1.unique2 = t2.unique2) and (t1.unique2 < 1000) and (t2.unique2 < 1000);
+drop table temp;
+select t1.*,o.unique1 AS ounique1,o.unique2 AS ounique2,o.two AS otwo,o.four AS ofour,o.ten AS oten,o.twenty AS otwenty,o.hundred AS ohundred,o.thousand AS othousand,o.twothousand AS otwothousand,o.fivethous AS ofivethous,o.tenthous AS otenthous,o.odd AS oodd, o.even AS oeven,o.stringu1 AS ostringu1,o.stringu2 AS ostringu2,o.string4 AS ostring4 into table temp from onek o, tenk1 t1, tenk1 t2 where (o.unique2 = t1.unique2) and (t1.unique2 = t2.unique2) and (t1.unique2 < 1000) and (t2.unique2 < 1000);
+drop table temp;
diff --git a/src/test/bench/query12 b/src/test/bench/query12
new file mode 100644
index 00000000000..d1b4611feea
--- /dev/null
+++ b/src/test/bench/query12
@@ -0,0 +1,4 @@
+select t1.*,t2.unique1 AS t2unique1,t2.unique2 AS t2unique2,t2.two AS t2two, t2.four AS t2four,t2.ten AS t2ten,t2.twenty AS t2twenty,t2.hundred AS t2hundred,t2.thousand AS t2thousand,t2.twothousand AS t2twothousand, t2.fivethous AS t2fivethous,t2.tenthous AS t2tenthous,t2.odd AS t2odd, t2.even AS t2even,t2.stringu1 AS t2stringu1,t2.stringu2 AS t2stringu2, t2.string4 AS t2string4 into table temp from tenk1 t1, tenk2 t2 where (t1.unique2 = t2.unique2) and (t2.unique2 < 1000);
+drop table temp;
+select t1.*,t2.unique1 AS t2unique1,t2.unique2 AS t2unique2,t2.two AS t2two, t2.four AS t2four,t2.ten AS t2ten,t2.twenty AS t2twenty,t2.hundred AS t2hundred,t2.thousand AS t2thousand,t2.twothousand AS t2twothousand, t2.fivethous AS t2fivethous,t2.tenthous AS t2tenthous,t2.odd AS t2odd, t2.even AS t2even,t2.stringu1 AS t2stringu1,t2.stringu2 AS t2stringu2, t2.string4 AS t2string4 into table temp from tenk1 t1, tenk2 t2 where (t1.unique2 = t2.unique2) and (t2.unique2 < 1000);
+drop table temp;
diff --git a/src/test/bench/query13 b/src/test/bench/query13
new file mode 100644
index 00000000000..de372aa6472
--- /dev/null
+++ b/src/test/bench/query13
@@ -0,0 +1,4 @@
+select t.*,B.unique1 AS Bunique1,B.unique2 AS Bunique2,B.two AS Btwo,B.four AS Bfour,B.ten AS Bten,B.twenty AS Btwenty,B.hundred AS Bhundred,B.thousand AS Bthousand,B.twothousand AS Btwothousand,B.fivethous AS Bfivethous,B.tenthous AS Btenthous,B.odd AS Bodd,B.even AS Beven,B.stringu1 AS Bstringu1,B.stringu2 AS Bstringu2,B.string4 AS Bstring4 into table temp from tenk1 t, Bprime B where t.unique2 = B.unique2;
+drop table temp;
+select t.*,B.unique1 AS Bunique1,B.unique2 AS Bunique2,B.two AS Btwo,B.four AS Bfour,B.ten AS Bten,B.twenty AS Btwenty,B.hundred AS Bhundred,B.thousand AS Bthousand,B.twothousand AS Btwothousand,B.fivethous AS Bfivethous,B.tenthous AS Btenthous,B.odd AS Bodd,B.even AS Beven,B.stringu1 AS Bstringu1,B.stringu2 AS Bstringu2,B.string4 AS Bstring4 into table temp from tenk1 t, Bprime B where t.unique2 = B.unique2;
+drop table temp;
diff --git a/src/test/bench/query14 b/src/test/bench/query14
new file mode 100644
index 00000000000..abbce829a84
--- /dev/null
+++ b/src/test/bench/query14
@@ -0,0 +1,4 @@
+select t1.*,o.unique1 AS ounique1,o.unique2 AS ounique2,o.two AS otwo,o.four AS ofour,o.ten AS oten,o.twenty AS otwenty,o.hundred AS ohundred,o.thousand AS othousand,o.twothousand AS otwothousand,o.fivethous AS ofivethous,o.tenthous AS otenthous,o.odd AS oodd, o.even AS oeven,o.stringu1 AS ostringu1,o.stringu2 AS ostringu2,o.string4 AS ostring4 into table temp from onek o, tenk1 t1, tenk1 t2 where (o.unique2 = t1.unique2) and (t1.unique2 = t2.unique2) and (t1.unique2 < 1000) and (t2.unique2 < 1000);
+drop table temp;
+select t1.*,o.unique1 AS ounique1,o.unique2 AS ounique2,o.two AS otwo,o.four AS ofour,o.ten AS oten,o.twenty AS otwenty,o.hundred AS ohundred,o.thousand AS othousand,o.twothousand AS otwothousand,o.fivethous AS ofivethous,o.tenthous AS otenthous,o.odd AS oodd, o.even AS oeven,o.stringu1 AS ostringu1,o.stringu2 AS ostringu2,o.string4 AS ostring4 into table temp from onek o, tenk1 t1, tenk1 t2 where (o.unique2 = t1.unique2) and (t1.unique2 = t2.unique2) and (t1.unique2 < 1000) and (t2.unique2 < 1000);
+drop table temp;
diff --git a/src/test/bench/query15 b/src/test/bench/query15
new file mode 100644
index 00000000000..be5fb5b45f7
--- /dev/null
+++ b/src/test/bench/query15
@@ -0,0 +1,4 @@
+select t1.*, t2.unique1 AS t2unique1, t2.unique2 AS t2unique2, t2.two AS t2two, t2.four AS t2four, t2.ten AS t2ten, t2.twenty AS t2twenty, t2.hundred AS t2hundred, t2.thousand AS t2thousand,t2.twothousand AS t2twothousand, t2.fivethous AS t2fivethous, t2.tenthous AS t2tenthous, t2.odd AS t2odd, t2.even AS t2even, t2.stringu1 AS t2stringu1, t2.stringu2 AS t2stringu2, t2.string4 AS t2string4 into table temp from tenk1 t1, tenk2 t2 where (t1.unique1 = t2.unique1) and (t2.unique1 < 1000);
+drop table temp;
+select t1.*, t2.unique1 AS t2unique1, t2.unique2 AS t2unique2, t2.two AS t2two, t2.four AS t2four, t2.ten AS t2ten, t2.twenty AS t2twenty, t2.hundred AS t2hundred, t2.thousand AS t2thousand,t2.twothousand AS t2twothousand, t2.fivethous AS t2fivethous, t2.tenthous AS t2tenthous, t2.odd AS t2odd, t2.even AS t2even, t2.stringu1 AS t2stringu1, t2.stringu2 AS t2stringu2, t2.string4 AS t2string4 into table temp from tenk1 t1, tenk2 t2 where (t1.unique1 = t2.unique1) and (t2.unique1 < 1000);
+drop table temp;
diff --git a/src/test/bench/query16 b/src/test/bench/query16
new file mode 100644
index 00000000000..6e366490309
--- /dev/null
+++ b/src/test/bench/query16
@@ -0,0 +1,4 @@
+select t.*, B.unique1 AS Bunique1,B.unique2 AS Bunique2,B.two AS Btwo,B.four AS Bfour,B.ten AS Bten, B.twenty AS Btwenty, B.hundred AS Bhundred,B.thousand AS Bthousand,B.twothousand AS Btwothousand, B.fivethous AS Bfivethous,B.tenthous AS Btenthous,B.odd AS Bodd, B.even AS Beven,B.stringu1 AS Bstringu1,B.stringu2 AS Bstringu2,B.string4 AS Bstring4 into table temp from tenk1 t, Bprime B where t.unique1 = B.unique1;
+drop table temp;
+select t.*, B.unique1 AS Bunique1,B.unique2 AS Bunique2,B.two AS Btwo,B.four AS Bfour,B.ten AS Bten, B.twenty AS Btwenty, B.hundred AS Bhundred,B.thousand AS Bthousand,B.twothousand AS Btwothousand, B.fivethous AS Bfivethous,B.tenthous AS Btenthous,B.odd AS Bodd, B.even AS Beven,B.stringu1 AS Bstringu1,B.stringu2 AS Bstringu2,B.string4 AS Bstring4 into table temp from tenk1 t, Bprime B where t.unique1 = B.unique1;
+drop table temp;
diff --git a/src/test/bench/query17 b/src/test/bench/query17
new file mode 100644
index 00000000000..e3b501ba3ff
--- /dev/null
+++ b/src/test/bench/query17
@@ -0,0 +1,4 @@
+select t1.*, o.unique1 AS ounique1,o.unique2 AS ounique2,o.two AS otwo,o.four AS ofour,o.ten AS oten,o.twenty AS otwenty,o.hundred AS ohundred,o.thousand AS othousand,o.twothousand AS otwothousand,o.fivethous AS ofivethous,o.tenthous AS otenthous,o.odd AS oodd, o.even AS oeven,o.stringu1 AS ostringu1,o.stringu2 AS ostringu2,o.string4 AS ostring4 into table temp from onek o, tenk1 t1, tenk2 t2 where (o.unique1 = t1.unique1) and (t1.unique1 = t2.unique1) and (t1.unique1 < 1000) and (t2.unique1 < 1000);
+drop table temp;
+select t1.*, o.unique1 AS ounique1,o.unique2 AS ounique2,o.two AS otwo,o.four AS ofour,o.ten AS oten,o.twenty AS otwenty,o.hundred AS ohundred,o.thousand AS othousand,o.twothousand AS otwothousand,o.fivethous AS ofivethous,o.tenthous AS otenthous,o.odd AS oodd, o.even AS oeven,o.stringu1 AS ostringu1,o.stringu2 AS ostringu2,o.string4 AS ostring4 into table temp from onek o, tenk1 t1, tenk2 t2 where (o.unique1 = t1.unique1) and (t1.unique1 = t2.unique1) and (t1.unique1 < 1000) and (t2.unique1 < 1000);
+drop table temp;
diff --git a/src/test/bench/query18 b/src/test/bench/query18
new file mode 100644
index 00000000000..92fe5f79b2d
--- /dev/null
+++ b/src/test/bench/query18
@@ -0,0 +1,4 @@
+select two, four, ten, twenty, hundred, string4 into table temp from tenk1;
+drop table temp;
+select two, four, ten, twenty, hundred, string4 into table temp from tenk1;
+drop table temp;
diff --git a/src/test/bench/query19 b/src/test/bench/query19
new file mode 100644
index 00000000000..1ed160d7ab8
--- /dev/null
+++ b/src/test/bench/query19
@@ -0,0 +1,4 @@
+select * into table temp from onek;
+drop table temp;
+select * into table temp from onek;
+drop table temp;
diff --git a/src/test/bench/query20 b/src/test/bench/query20
new file mode 100644
index 00000000000..e544ea63f49
--- /dev/null
+++ b/src/test/bench/query20
@@ -0,0 +1,4 @@
+select int4min(unique2) as x into table temp from tenk1;
+drop table temp;
+select int4min(unique2) as x into table temp from tenk1;
+drop table temp;
diff --git a/src/test/bench/query21 b/src/test/bench/query21
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/test/bench/query21
diff --git a/src/test/bench/query22 b/src/test/bench/query22
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/test/bench/query22
diff --git a/src/test/bench/query23 b/src/test/bench/query23
new file mode 100644
index 00000000000..e544ea63f49
--- /dev/null
+++ b/src/test/bench/query23
@@ -0,0 +1,4 @@
+select int4min(unique2) as x into table temp from tenk1;
+drop table temp;
+select int4min(unique2) as x into table temp from tenk1;
+drop table temp;
diff --git a/src/test/bench/query24 b/src/test/bench/query24
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/test/bench/query24
diff --git a/src/test/bench/query25 b/src/test/bench/query25
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/test/bench/query25
diff --git a/src/test/bench/query26 b/src/test/bench/query26
new file mode 100644
index 00000000000..715c4c37441
--- /dev/null
+++ b/src/test/bench/query26
@@ -0,0 +1,2 @@
+insert into tenk1 (unique1, unique2, two, four, ten, twenty, hundred, thousand, twothousand, fivethous, tenthous, odd, even,stringu1,stringu2, string4) values (1000, 74, 0, 2, 0, 10, 50, 688, 1950, 4950, 9950, 1, 100, "ron may choi","jae kwang choi", "u. c. berkeley");
+insert into tenk1 (unique1, unique2, two, four, ten, twenty, hundred, thousand, twothousand, fivethous, tenthous, odd, even, stringu1, stringu2, string4) values (1999, 60, 0, 2, 0, 10, 50, 688, 1950, 4950, 9950, 1, 100, "ron may choi", "jae kwang choi", "u. c. berkeley");
diff --git a/src/test/bench/query27 b/src/test/bench/query27
new file mode 100644
index 00000000000..c837735dcda
--- /dev/null
+++ b/src/test/bench/query27
@@ -0,0 +1,2 @@
+delete from tenk1 where tenk1.unique2 = 877;
+delete from tenk1 where tenk1.unique2 = 876;
diff --git a/src/test/bench/query28 b/src/test/bench/query28
new file mode 100644
index 00000000000..c3d01c92cfc
--- /dev/null
+++ b/src/test/bench/query28
@@ -0,0 +1,2 @@
+update tenk1 set unique2 = 10001 where tenk1.unique2 =1491;
+update tenk1 set unique2 = 10023 where tenk1.unique2 =1480;
diff --git a/src/test/bench/query29 b/src/test/bench/query29
new file mode 100644
index 00000000000..3600685c6a5
--- /dev/null
+++ b/src/test/bench/query29
@@ -0,0 +1,2 @@
+insert into tenk1 (unique1, unique2, two, four, ten, twenty, hundred, thousand, twothousand, fivethous, tenthous, odd, even, stringu1, stringu2, string4) values (1000, 70, 0, 2, 0, 10, 50, 688, 1950, 4950, 9950, 1, 100, "ron may choi", "jae kwang choi", "u. c. berkeley");
+insert into tenk1 (unique1, unique2, two, four, ten, twenty, hundred, thousand, twothousand, fivethous, tenthous, odd, even, stringu1, stringu2, string4) values (500, 40, 0, 2, 0, 10, 50, 688, 1950, 4950, 9950, 1, 100, "ron may choi", "jae kwang choi", "u. c. berkeley");
diff --git a/src/test/bench/query30 b/src/test/bench/query30
new file mode 100644
index 00000000000..e8b37e6771c
--- /dev/null
+++ b/src/test/bench/query30
@@ -0,0 +1,2 @@
+delete from tenk1 where tenk1.unique2 = 10001;
+delete from tenk1 where tenk1.unique2 = 900;
diff --git a/src/test/bench/query31 b/src/test/bench/query31
new file mode 100644
index 00000000000..cbdb85d3dad
--- /dev/null
+++ b/src/test/bench/query31
@@ -0,0 +1,2 @@
+update tenk1 set unique2 = 10088 where tenk1.unique2 =187;
+update tenk1 set unique2 = 10003 where tenk1.unique2 =2000;
diff --git a/src/test/bench/query32 b/src/test/bench/query32
new file mode 100644
index 00000000000..3b4159c93bc
--- /dev/null
+++ b/src/test/bench/query32
@@ -0,0 +1,2 @@
+update tenk1 set unique2 = 10020 where tenk1.unique2 =1974;
+update tenk1 set unique2 = 160 where tenk1.unique2 =1140;
diff --git a/src/test/bench/runwisc.sh b/src/test/bench/runwisc.sh
new file mode 100755
index 00000000000..0d5afa389e0
--- /dev/null
+++ b/src/test/bench/runwisc.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# $Header: /cvsroot/pgsql/src/test/bench/Attic/runwisc.sh,v 1.1.1.1 1996/07/09 06:22:23 scrappy Exp $
+#
+# Note that in our published benchmark numbers, we executed the command in the
+# following fashion:
+#
+# time $POSTGRES -texecutor -tplanner -f hashjoin -Q bench
+#
+if [ -d ./obj ]; then
+ cd ./obj
+fi
+
+echo =============== vacuuming benchmark database... =================
+echo "vacuum" | postgres -Q bench > /dev/null
+
+echo =============== running benchmark... =================
+time postgres -texecutor -tplanner -Q bench < bench.sql
diff --git a/src/test/bench/wholebench.sh b/src/test/bench/wholebench.sh
new file mode 100755
index 00000000000..b6844494363
--- /dev/null
+++ b/src/test/bench/wholebench.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sh create.sh
+echo Running the benchmark....
+sh runwisc.sh