How To Run a TPC-H-like Benchmark in 2 Short Steps

July 19, 2023

Continuing on from How To Run a Complex Postgres Benchmark Easily - Master TPC-C in 3 Short Steps, where I simplified the execution of a complex benchmark such that it is as easy to run as pgbench, we now move on to the TPC Benchmark (TM) H (TPC-H).  The TPC-H is a decision support benchmark consisting of a suite of business oriented ad-hoc queries and concurrent data modifications.

Database Test 3 (DBT-3) is a fair-use open source implementation that helps execute this benchmark.  Try the AppImage, which we will rename to dbt3 for brevity in this example.

The next thing to do is to download the TPC-H Tools, because of distribution rules for TPC provided code, and to unzip it.  You will still need a C compiler, make and patch on the system for the DBT-3 AppImage to build the TPC-H Tools and prepare a set of query templates:

dbt3 build-dbgen pgsql "TPC-H V3.0.1"

The next command will run the full benchmark that includes the load, power, and throughput tests using default value of 1 GB for the scale factor with 2 refresh streams and save the results in a directory results:

dbt3 run --tpchtools="TPC-H V3.0.1" pgsql results

The scores of the test will be displayed once the test completes:

       Composite Score:    10266.16
Load Test Time (hours):         .01
      Power Test Score:     9990.70
 Throughput Test Score:    10549.22


Want to try it? The documentation is also available online.

Share this

Relevant Blogs

Finding memory leaks in Postgres C code

I spent the last week looking for a memory leak in Postgres’s WAL Sender process. I spent a few days getting more acquainted with Valgrind and gcc/clang sanitizers, but ultimately...
March 27, 2024

Exploring EDB SPL Check: A New Feature in EPAS 16

EDB Postgres Advanced Server (EPAS) has introduced a highly anticipated feature called EDB SPL Check in its 16th version. This extension is a boon for developers working with Stored Procedure...
December 18, 2023

More Blogs

AI, Postgres and You: A Vision for the Future

Let's talk about something I'm very excited about: tech. We’ve all seen tech inventions rise and fall fast in IT, and it's difficult to predict which inventions will make it...
November 14, 2023