From v4.10 a new schema check option has been added. This schema check can be run after the build process to verify that the build completed successfully and also after running the workload to ensure that the data in your database remained consistent. This can also be useful for example when testing clustered, distributed or replicated database environments.
To check the schema choose the Check option from the treeview or the top level menu.
If the check completes without error it will report a message that the check has been successful meaning that the schema is valid and the data is consistent.
The following checks will be run against the schema and data:
Database Exists.
Tables Exist.
Warehouse count in schema is the same as the HammerDB configuration.
Tables are indexed.
Tables are populated.
Stored Procedures Exist.
Consistency Checks.
The sum of balances (d_ytd) for all Districts within a specific Warehouse is equal to the balance (w_ytd) of that Warehouse.
For each District within a Warehouse, the next available Order ID (d_next_o_id) minus one is equal to the most recent Order ID [max(o_id)] for the ORDER table associated with the preceding District and Warehouse. Additionally, that same relationship exists for the most recent Order ID [max(o_id)] for the NEW-ORDER table associated with the same District and Warehouse. Those relationships can be illustrated as: d_next_o_id – 1 = max(o_id) = max(no_o_id) where (d_w_id = o_w_id = no_w_id) and (d_id = o_d_id = no_d_id)
For each District within a Warehouse, the value of the most recent Order ID [max(no_o_id)] minus the first Order ID [min(no_o_id)] plus one, for the NEW-ORDER table associated with the District and Warehouse, equals the number of rows in that NEW-ORDER table. That relationship can be illustrated as: max(no_o_id) – min(no_o_id) + 1 = rows in NEW-ORDER where (o_w_id = no_w_id) and (o_d_id = no_d_id)
For each District within a Warehouse, the sum of Order-Line counts [sum(o_ol_cnt)] for the Orders associated with the District equals the number of rows in the ORDER-LINE table associated with the same District. That relationship can be illustrated as: sum(o_ol_cnt) = rows in the ORDER-LINE table for the Warehouse and District