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 original inspiration for the
pgbench test is the Transaction Processing Performance Council (TPC) benchmark named TPC-B: http://www.tpc.org/tpcb/.
Originally developed ...