2000-08-18 12:48:00 +03:00
|
|
|
|
# This file describes how to run MySQL benchmarks with Postgres
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# The test was run on a Intel Xeon 2x 550 Mzh machine with 1G memory,
|
|
|
|
|
# 9G hard disk. The OS is Suse 6.4, with Linux 2.2.14 compiled with SMP
|
|
|
|
|
# support
|
|
|
|
|
# Both the perl client and the database server is run
|
|
|
|
|
# on the same machine. No other cpu intensive process was used during
|
|
|
|
|
# the benchmark.
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
# First, install postgresql-7.0.2.tar.gz
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Start by adding the following lines to your ~/.bash_profile or
|
|
|
|
|
# corresponding file. If you are using csh, use <20>setenv<6E>.
|
|
|
|
|
#
|
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
export POSTGRES_INCLUDE=/usr/local/pg/include
|
|
|
|
|
export POSTGRES_LIB=/usr/local/pg/lib
|
2000-08-18 12:48:00 +03:00
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
PATH=$PATH:/usr/local/pg/bin
|
|
|
|
|
MANPATH=$MANPATH:/usr/local/pg/man
|
2000-08-18 12:48:00 +03:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Add the following line to /etc/ld.so.conf:
|
|
|
|
|
#
|
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
/usr/local/pg/lib
|
2000-08-18 12:48:00 +03:00
|
|
|
|
and run ldconfig.
|
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
# untar the postgres source distribution, cd to postgresql-*
|
|
|
|
|
# and run the following commands:
|
2000-08-18 12:48:00 +03:00
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
CFLAGS=-O3 ./configure
|
2000-08-18 12:48:00 +03:00
|
|
|
|
gmake
|
|
|
|
|
gmake install
|
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
mkdir /usr/local/pg/data
|
|
|
|
|
chown postgres /usr/local/pg/data
|
2000-08-18 12:48:00 +03:00
|
|
|
|
su - postgres
|
2001-06-03 12:26:24 +03:00
|
|
|
|
/usr/local/pg/bin/initdb -D /usr/local/pg/data
|
|
|
|
|
/usr/local/pg/bin/postmaster -o -F -D /usr/local/pg/data &
|
|
|
|
|
/usr/local/pg/bin/createdb test
|
|
|
|
|
exit
|
2000-08-18 12:48:00 +03:00
|
|
|
|
|
|
|
|
|
#
|
2001-06-03 12:26:24 +03:00
|
|
|
|
# Second, install packages DBD-Pg-1.00.tar.gz and DBI-1.14.tar.gz,
|
2000-08-18 12:48:00 +03:00
|
|
|
|
# available from http://www.perl.com/CPAN/
|
2001-06-03 12:26:24 +03:00
|
|
|
|
|
|
|
|
|
export POSTGRES_LIB=/usr/local/pg/lib/
|
|
|
|
|
export POSTGRES_INCLUDE=/usr/local/pg/include/postgresql
|
|
|
|
|
perl Makefile.PL
|
|
|
|
|
make
|
|
|
|
|
make install
|
2000-08-18 12:48:00 +03:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Now we run the test that can be found in the sql-bench directory in the
|
|
|
|
|
# MySQL 3.23 source distribution.
|
|
|
|
|
#
|
|
|
|
|
# We did run two tests:
|
|
|
|
|
# The standard test
|
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql
|
2000-08-18 12:48:00 +03:00
|
|
|
|
|
|
|
|
|
# and a test where we do a vacuum() after each update.
|
|
|
|
|
# (The time for vacuum() is counted in the book-keeping() column)
|
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql --fast
|
2000-08-18 12:48:00 +03:00
|
|
|
|
|
|
|
|
|
# If you want to store the results in a output/RUN-xxx file, you should
|
|
|
|
|
# repeate the benchmark with the extra option --log --use-old-result
|
|
|
|
|
# This will create a the RUN file based of the previous results
|
|
|
|
|
|
2001-06-03 12:26:24 +03:00
|
|
|
|
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql --log --use-old-result
|
|
|
|
|
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512MG, pg started with -o -F" --user=postgres --server=pg --cmp=mysql --fast --log --use-old-result
|