mariadb/sql-bench
monty@mysql.com/narttu.mysql.fi f0ae3ce9b9 Fixed compiler warnings
Fixed compile-pentium64 scripts
Fixed wrong estimate of update_with_key_prefix in sql-bench
Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
Split handle_one_connection() into reusable sub functions.
Split create_new_thread() into reusable sub functions.
Added thread_scheduler; Preliminary interface code for future thread_handling code.

Use 'my_thread_id' for internal thread id's
Make thr_alarm_kill() to depend on thread_id instead of thread
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
In store_globals(), set my_thread_var->id to be thd->thread_id.
Use my_thread_var->id as basis for my_thread_name()
The above changes makes the connection we have between THD and threads more soft.

Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
Fixed compiler warnings
Fixed core dumps when running with --debug
Removed setting of signal masks (was never used)
Made event code call pthread_exit() (portability fix)
Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
Removed one common 'not freed memory' warning from mysqltest
Fixed a couple of usage of not initialized warnings (unlikely cases)
Suppress compiler warnings from bdb and (for the moment) warnings from ndb
2007-02-23 13:13:55 +02:00
..
Comments Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
Data Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
limits Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
as3ap.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
bench-count-distinct.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
bench-init.pl.sh Fixed compiler warnings 2007-02-23 13:13:55 +02:00
compare-results.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
copy-db.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
crash-me.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
example Fixed compiler warnings 2007-02-23 13:13:55 +02:00
example.bat Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
graph-compare-results.sh Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
innotest1.sh Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
innotest1a.sh Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
innotest1b.sh Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
innotest2.sh Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
innotest2a.sh Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
innotest2b.sh Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
Makefile.am my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
pwd.bat Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
README Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
run-all-tests.sh Fixed compiler warnings 2007-02-23 13:13:55 +02:00
server-cfg.sh Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-31 01:32:21 +01:00
test-alter-table.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
test-ATIS.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
test-big-tables.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
test-connect.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
test-create.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
test-insert.sh Fixed compiler warnings 2007-02-23 13:13:55 +02:00
test-select.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
test-transactions.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
test-wisconsin.sh my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
TODO Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00
uname.bat Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations 2006-11-29 22:51:09 +02:00

The MySQL Benchmarks

These tests require a MySQL version of at least 3.20.28 or 3.21.10.

Currently the following servers are supported:
MySQL 3.20 and 3.21, PostgreSQL 6.#, mSQL 2.# and Solid Server 2.2

The benchmark directory contains the query files and raw data files used to
populate the MySQL benchmark tables. In order to run the benchmarks, you
should normally execute a command such as the following:

run-all-tests --server=mysql --cmp=mysql,pg,solid --user=test --password=test --log

This means that you want to run the benchmarks with MySQL. The
limits should be taken from all of MySQL, PostgreSQL, and Solid.
The login name and password for connecting to the server both are
``test''.  The result should be saved as a RUN file in the output
directory.

When run-all-tests has finished, will have the individual results and the
the total RUN- file in the output directory.

If you want to look at some old results, use the compare-results script.
For example:

compare-results --dir=Results --cmp=mysql,pg,solid
compare-results --dir=Results --cmp=mysql,pg,solid --relative

compare-results --dir=Results --cmp=msql,mysql,pg,solid
compare-results --dir=Results --cmp=msql,mysql,pg,solid --relative

compare-results --dir=Results --server=mysql --same-server --cmp=mysql,pg,solid

Some of the files in the benchmark directory are:

File			Description

Data/ATIS		Contains data for 29 related tables used in the ATIS tests.
Data/Wisconsin		Contains data for the Wisconsin benchmark.
Results			Contains old benchmark results.
Makefile.am		Automake Makefile
README			This file.
test-ATIS.sh		Creation of 29 tables and a lot of selects on them.
test-connect.sh		Test how fast a connection to the server is.
test-create.sh		Test how fast a table is created.
test-insert.sh		Test create and fill of a table.
test-wisconsin.sh	A port of the PostgreSQL version of this benchmark.
run-all-tests		Use this to run all tests. When all tests are run,
			use the --log and --use-old options to get a RUN-file.
compare-results		Generates a comparison table from different RUN files.
server-cfg		Contains the limits and functions for all supported
			SQL servers.  If you want to add a new server, this
			should be the only file that neads to be changed.


Most of the tests should use portable SQL to make it possible to
compare different databases. Sometimes SQL extensions can make things
a lot faster. In this case the test may use the extensions if the --fast
option is used.

Useful options to all test-scripts (and run-all-tests):

--host=#	Hostname for MySQL server (default: localhost)
--db=#		Database to use (default: test)
--fast		Allow use of any non-standard SQL extension to
		get things done faster.
--lock-tables	Use table locking to get more speed.

From a text at http://www.mgt.ncu.edu.tw/CSIM/Paper/sixth/11.html:

The Wisconsin Benchmark

The Wisconsin Benchmark described in [Bitton, DeWitt, and Turbyfill
1983] [Boral and DeWitt 1984] [Bitton and Turbyfill 1985] [Bitton and
Turbyfill 1988], and [DeWitt 1993] is the first effort to
systematically measure and compare the performance of relational
database systems with database machines.  The benchmark is a
single-user and single-factor experiment using a synthetic database
and a controlled workload.  It measures the query optimization
performance of database systems with 32 query types to exercise the
components of the proposed systems.  The query suites include
selection, join, projection, aggregate, and simple update queries.

The test database consists of four generic relations.  The tenk
relation is the key table and most used. Two data types of small
integer numbers and character strings are utilized.  Data values are
uniformly distributed. The primary metric is the query elapsed
time. The main criticisms of the benchmark include the nature of
single-user workload, the simplistic database structure, and the
unrealistic query tests.  A number of efforts have been made to extend
the benchmark to incorporate the multi-user test.  However, they do
not receive the same acceptance as the original Wisconsin benchmark
except an extension work called the AS3AP benchmark.