pgbench
pgbench is a command-line benchmarking tool included with the PostgreSQL database system. It is designed to measure the performance of PostgreSQL under various workloads, helping administrators and developers assess database efficiency, scalability, and throughput. pgbench is particularly useful for evaluating read-heavy, write-heavy, or mixed workloads, as well as for testing transactional performance under different configurations.
The tool simulates client activity by executing predefined SQL commands against a PostgreSQL database. By default,
pgbench provides detailed output metrics, including transactions per second (TPS), response times, and error rates. These
pgbench is lightweight and does not require additional dependencies beyond PostgreSQL itself. It is commonly used