You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sql-benchmark provides simple benchmark of several database drivers in several languages.
Benchmarks are intended to be simple so that they can be implemented easily for several
languages and SQL databases. Some of the goals are:
Evaluate the performance of a database driver,
Compare the performance of different languages when connecting to a database,
Have a rough comparison on simple SQL queries on different databases.
Before running the SQL benchmark of MySQL/MariaDB and PostgreSQL, you must create the
sqlbench database and give access to the sqlbench user.
The SQLite database is created automatically.
MySQL/MariaDB setup
Create the 'sqlbench' database in MySQL/MariaDB
mysql -u root
mysql> create database sqlbench;
Create the 'sqlbench' user:
mysql> create user 'sqlbench'@'localhost' identified by 'sqlbench';
Give the access rights:
mysql> grant select, insert, update, delete,
create, drop, create temporary tables, execute,
show view on sqlbench.* to sqlbench@'localhost';
mysql> flush privileges;
Postgresql setup
To create manually the database, you can proceed to the following steps:
Create the 'sqlbench' user and configure the password
(enter 'sqlbench' for the password or update the configuration sqlbench.properties file):
sudo -u postgres createuser sqlbench --pwprompt
Create the 'sqlbench' database in Postgresql
sudo -u postgres createdb -O sqlbench sqlbench
Running
The script run-all.sh can be used to run all the benchmark and produce the results.
Before running it, make sure you have built the Ada and Java benchmark programs as
well as the Ada aggregator tool. To build, run the following commands.
cd ado
./configure
make
cd ../java
mvn compile assembly:single
cd ../tools
./configure
make
cd ..