pgbench的使用简介

Windows下测试环境搭建

cd C:\Program Files\PostgreSQL\9.2\bin

步骤1:创建库

createdb -U postgres -E utf8 --lc-collate "Chinese, zh_CN" pgbench

 

步骤2:初使用pgbench的数据:

pgbench -U postgres -i pgbench

 

步骤3:测试

pgbench -U postgres -c 10 -t 100 pgbench

pgbehch的使用帮助:
pgbehch --help

 

 

-c clients模拟的客户数,也就是并发数据库会话数目。缺省是 1。

 

-t transactions每个客户端跑的事务数目。缺省是 10。

 

posted @ 2013-04-27 10:57  糖豆爸爸  阅读(744)  评论(0编辑  收藏  举报
Live2D