Database Benchmarking

PostgreSQL ships with a benchmarking program named pgbench that can be used for a variety of tests. The default tests included are useful, but it also includes a database benchmarking scripting language that allows for customizing them. You can even use the pgbench core—an efficient, scalable multi-client database program to write completely custom tests. There are also some industry-standard tests available that let you compare PostgreSQL with other database products, albeit without officially audited results in most cases.

The topics we will cover in this chapter are as follows:

  • PostgreSQL benchmarking tool pgbench
  • Built-in pgbench benchmarks
  • Custom benchmark using pgbench

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.