-
Notifications
You must be signed in to change notification settings - Fork 13
/
HOW-TO-RUN.txt
68 lines (43 loc) · 2.3 KB
/
HOW-TO-RUN.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Instructions for running
------------------------
Use of JDK7 is required. Sample JDBC Connection Property files are provided as follows:
props.pg : for PostgreSQL/EnterpriseDB
props.ora : for Oracle
0. As the user postgres, create the benchmarksql user with correct permissions.
postgres=# CREATE USER benchmarksql WITH SUPERUSER PASSWORD 'password';
postgres=# GRANT ALL PRIVILEGES ON DATABASE postgres TO benchmarksql;
1. Go to the 'run' directory, edit the appropriate "props.???"
file to point to the database instance you'd like to test.
2. Run the "sqlTableCreates" to create the base tables.
$ ./runSQL.sh props.pg sqlTableCreates
3. Run the Loader command file to load all of the default data
for a benchmark:
A.) Approximately half a million rows (per Warehouse) will be loaded
across 9 tables.
$ ./runLoader.sh props.pg numWarehouses 1
NOTE: You should run the sqlTableTruncates scripts if your tables
are not already empty.
B.) Alternatively, for PostgreSQL you may choose to generate the
load data out to CSV files where it can be efficiently
bulk loaded into the database as many times as required by your
testing.
$ ./runLoader.sh props.pg numWarehouses 1 fileLocation /tmp/csv/
These CSV files can be bulk loaded as follows:
$ ./runSQL.sh props.pg sqlTableCopies
You may truncate the data via:
$ ./runSQL.sh props.pg sqlTableTruncates
4. Run the "runSQL" command file to execute the SQL script
"sqlIndexCreates" to create the primary keys & other indexes
on the tables.
$ ./runSQL.sh props.pg sqlIndexCreates
5. Optionally run the "runSQL" command file to execute the SQL script
"sqlExtraCreates.<dbflavor>" to make history.hist_id an auto-increment
primary key. This column does not exist in the TPC-C standard and is
provided for convenience of users of replication systems such as
Bucardo or Slony-I. The benchmark itself will work with or without
it being an actual auto-incrementing primary key.
$ ./runSQL.sh props.pg sqlIndexCreates.pg
6. Run the "runBenchmark" command file to test the database. This command
will create terminals and automatically start the transaction based on
the parameters set in "props".
$ ./runBenchmark.sh props.pg