The world's most popular open source database
This benchmark suite is meant to tell any user what operations a
given SQL implementation performs well or poorly. You can get a
good idea for how the benchmarks work by looking at the code and
results in the sql-bench directory in any
MySQL source distribution.
Note that this benchmark is single-threaded, so it measures the minimum time for the operations performed. We plan to add multi-threaded tests to the benchmark suite in the future.
To use the benchmark suite, the following requirements must be satisfied:
The benchmark suite is provided with MySQL source distributions. You can either download a released distribution from http://dev.mysql.com/downloads/, or use the current development source tree. (See Section 2.9.3, “Installing from the Development Source Tree”.)
The benchmark scripts are written in Perl and use the Perl
DBI module to access database servers, so DBI must be
installed. You also need the server-specific DBD drivers for
each of the servers you want to test. For example, to test
MySQL, PostgreSQL, and DB2, you must have the
DBD::mysql, DBD::Pg,
and DBD::DB2 modules installed. See
Section 2.15, “Perl Installation Notes”.
After you obtain a MySQL source distribution, you can find the
benchmark suite located in its sql-bench
directory. To run the benchmark tests, build MySQL, and then
change location into the sql-bench
directory and execute the run-all-tests
script:
shell>cd sql-benchshell>perl run-all-tests --server=server_name
server_name should be the name of one
of the supported servers. To get a list of all options and
supported servers, invoke this command:
shell> perl run-all-tests --help
The crash-me script also is located in the
sql-bench directory.
crash-me tries to determine what features a
database system supports and what its capabilities and
limitations are by actually running queries. For example, it
determines:
What data types are supported
How many indexes are supported
What functions are supported
How big a query can be
How big a VARCHAR column can
be
For more information about benchmark results, visit http://www.mysql.com/why-mysql/benchmarks/.


User Comments
I got bench to run on windows 2000 by installing active perl 5.8.0, cygwin with full util package, DBI and mysql-DBD from ppm, replaced all hard coded paths for perl with !perl and changed references for $pwd at top of script to $pwd="." to execute relative to directory.
Seems to work just fine. Oh also needed to hack bench-init.pl as it didn't seem to be taking my passwd stuff correctly with $user and $password. I am running ./run-all-tests via cygwin bash.
This was with w2k svc pack 4 + mysql 4.0.15
If you want to specify a port for your mysql server, try this kludge:
perl run-all-tests --host='127.0.0.1;port=1234'
Add your own comment.