10. Run a Power Test

Many test environments are sufficient with running single Virtual User tests. With available parallel and column store configurations this test is sufficient to stress an entire system. Nevertheless a component of the TPROC-H test is the refresh function and the refresh function should be run either side of the Power Test. To enable this functionality HammerDB has a special power test mode, whereby if refresh_on is set to true as shown and only one virtual user is configured then HammerDB will run a Power Test. Note that once you selected refresh_on for a single Virtual User in Power Test Mode the value of update_sets will be set to 1 and the value of trickle_refresh set to 0 and the value of REFRESH_VERBOSE set to false, all these values will be set automatically to ensure optimal running of the Power Test.

Figure 12.33. Power Test Options

Power Test Options

With these settings run the Virtual User and it will run a New Sales Refresh, single Virtual User Query Set and Old Sales Refresh in order as required by a Power Test.

Figure 12.34. Power Test

Power Test

HammerDB will report when the Power Test is complete.

Figure 12.35. Power Test Complete

Power Test Complete

Be aware that some databases are considerably better at running the refresh functions than others and also that once the power test has been run it is necessary to restore the database from backup before running the refresh function again. If you fail to do so you will receive a constraint violation error. This is expected behaviour.

Error in Virtual User 1: 23000 2627 {[Microsoft][ODBC Driver 18 for SQL Server][SQL Server]
Violation of PRIMARY KEY constraint 'orders_pk'. 
Cannot insert duplicate key in object 'dbo.orders'. The duplicate key value is (9).}