Top

Chapter 21. TPC C Benchmark Kit

Abstract

The Virtuoso TPC C Kit is a database benchmark written in C and SQL stored procedures using the CLI or ODBC API. It is modeled after the industry standard Transaction Processing Performance Council (TPC) C benchmark and can be used as a component in an official benchmark but does not in itself constitute a complete test driver.

[Tip] See Also:

A complete description of the benchmark and its metric can be found at the TPC Web Site . This document assumes the reader is familiar with the general content of the benchmark.

The C and SQL source of the benchmark is contained in the sample directory of the Virtuoso tree. The tpcc executable is built by running make after choosing the target (see makefile).

21.1. Building the Test Database

To build a 1 warehouse test database (approximately 100 MB), go through the following procedure:

Start the database server.

Assuming the server is listening at the default port of 1111 on the local host execute:

isql 1111 dba dba tpccddk.sql
tpcc 1111 dba dba I 1

to create a 1 warehouse database. This may take some time. As long as the file gets longer everything is OK. You may follow the progress with interactive SQL.

Once the tpcc program exits you can load the stored procedures used by the benchmark. Assuming the server is listening at the default port of 1111 and that the dba password is the default `dba', type:

../isql 1111 dba dba tpcc.sql

This will exit when the procedures are loaded, typically a few seconds.

To complete the initialization make a checkpoint to freeze the initial database state:

./isql 1111
SQL> checkpoint;
Done.
SQL> exit;

The database is now ready for use.