Files
tldr/pages.zh/common/pgbench.md

12 lines
432 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# pgbench
> 在PostgreSQL上运行基准测试。
> 更多信息:<https://www.postgresql.org/docs/10/pgbench.html>。
- 使用默认大小的50倍规模因子初始化数据库
`pgbench --initialize --scale={{50}} {{database_name}}`
- 使用10个客户端、2个工作线程和每个客户端10,000个事务对数据库进行基准测试
`pgbench --client={{10}} --jobs={{2}} --transactions={{10000}} {{database_name}}`