From v4.10 a schema and data check has been added that can be run after a schema build and also after running a workload with a refresh function to ensure that the data remains consistent. To run the check select the Check option from the treeview or the main menu.
When completed a message will be shown if the check was successful.
The following checks will be run against the schema and data:
Database Exists.
Tables Exist.
Scale Factor in schema is the same as the HammerDB configuration.
Tables are indexed.
Tables are populated.
Consistency Check.
A consistent state for the TPC-H database is defined to exist when: O_TOTALPRICE = SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)(1+L_TAX) for each ORDER and LINEITEM defined by (O_ORDERKEY=L_ORDERKEY) and can be checked by: SELECT DECIMAL(SUM(DECIMAL(INTEGER(INTEGER(DECIMAL (INTEGER(100DECIMAL(L_EXTENDEDPRICE,20,3)),20,3)* (1-L_DISCOUNT)) * (1+L_TAX)),20,3)/100.0),20,3) FROM LINEITEM WHERE L_ORDERKEY = okey SELECT DECIMAL(SUM(O_TOTALPRICE, 20, 3)) from ORDERS WHERE O_ORDERKEY = okey