现在的位置: 首页 > 综合 > 正文

pgbench的使用简介

2013年05月21日 ⁄ 综合 ⁄ 共 297字 ⁄ 字号 评论关闭

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。

 

抱歉!评论已关闭.