Glossary / pgbench

pgbench

Practical PostgreSQL glossary entry with a clear definition, example, and benchmarking context.

What Is pgbench?

pgbench is PostgreSQL's built-in tool for benchmarking and performance testing. It simulates concurrent users executing transactions and reports key metrics like TPS and latency. It supports standard and custom SQL scripts for workload simulation.

Why It Matters for PostgreSQL Performance

In PostgreSQL performance work, pgbench affects throughput, latency, or operational reliability depending on workload and configuration.

Practical Benchmarking Context

When benchmarking with pgbench, track how pgbench changes behavior across scale factor, client concurrency, and storage conditions.

Use this term together with workload shape, concurrency level, and scale factor when interpreting pgbench outputs. Isolated values can be misleading without full run context.

Example

Command: pgbench -c 10 -t 1000 mydb

Related Resources