3. Configure Schema Build

Use the dbset command to choose a database and benchmark. For the database the database prefix shown in the XML configuration is used. IIf an incorrect database is selected the available values are prompted.

hammerdb>dbset db orac
Unknown prefix orac, choose one from ora mssqls db2 mysql pg redis

When a valid option is chosen the database is set.

hammerdb>dbset db redis
Database set to Redis

The print command can be used to confirm the chosen database and available options.

hammerdb>print db
Database Redis set.
To change do: dbset db prefix, one of:
Oracle = ora MSSQLServer = mssqls Db2 = db2 MySQL = mysql PostgreSQL = pg Redis = redis 

Similarly the workload is also selected from the available configuration also prompting if an incorrect value is chosen.

hammerdb>dbset bm TPC-H
Unknown benchmark TPC-H, choose one from TPC-C

when a correct value is chosen the selection is confirmed

hammerdb>dbset bm TPC-C
Benchmark set to TPC-C for Redis

The print bm command is used to confirm the benchmark

hammerdb>print bm
Benchmark set to TPC-C

After the database and workload is selected the print dict command lists all of the available configuration variables for that database.

hammerdb>print dict
Dictionary Settings for Redis
connection {
 redis_host      = 127.0.0.1
 redis_port      = 6379
 redis_namespace = 1
}
tpcc       {
 redis_count_ware       = 1
 redis_num_vu           = 1
 redis_total_iterations = 1000000
 redis_raiseerror       = false
 redis_keyandthink      = false
 redis_driver           = test
 redis_rampup           = 2
 redis_duration         = 5
 redis_allwarehouse     = false
 redis_timeprofile      = false
}

Use the diset command to change these values for example for the number of warehouses to build.

hammerdb>diset tpcc redis_count_ware 10
Changed tpcc:redis_count_ware from 1 to 10 for Redis

and the number of virtual users to build them.

hammerdb>diset tpcc redis_num_vu 4
Changed tpcc:redis_num_vu from 1 to 4 for Redis

print dict can confirm the selection.

hammerdb>print dict
Dictionary Settings for Redis
connection {
 redis_host      = 127.0.0.1
 redis_port      = 6379
 redis_namespace = 1
}
tpcc       {
 redis_count_ware       = 10
 redis_num_vu           = 4
 redis_total_iterations = 1000000
 redis_raiseerror       = false
 redis_keyandthink      = false
 redis_driver           = test
 redis_rampup           = 2
 redis_duration         = 5
 redis_allwarehouse     = false
 redis_timeprofile      = false
}