Examples in this Quickstart use the tpch
sample database, which is an ad-hoc decision support database
derived from the TPC
Benchmark⢠H (TPC-H) specification. For an overview
of the tpch
schema, refer to the
Logical Database Design section of the
specification
document.
The following instructions describe how to generate
tpch
sample data using the
dbgen
utility. The instructions assume you
are on a Linux system that has gcc
and
make
libraries installed.
To generate tpch
sample data:
Download the TPC-H tools zip file from TPC Download Current.
Extract the zip file to a location on your system.
-
Change to the
dbgen
directory and make a copy of the makefile template.$> cd 2.18.0/dbgen $> cp makefile.suite makefile
-
Configure the following settings in the makefile:
$> CC = gcc $> DATABASE= ORACLE $> MACHINE = LINUX $> WORKLOAD = TPCH
-
Run make to build the
dbgen
utility:$> make
-
Issue the following
dbgen
command to generate a 1GB set of data files for thetpch
database:$> ./dbgen -s 1
The operation may take a few minutes. When finished, the following data files appear in the working directory, one for each table in the
tpch
database:$> ls -1 *.tbl customer.tbl lineitem.tbl nation.tbl orders.tbl partsupp.tbl part.tbl region.tbl supplier.tbl