1,安装配置PostgreSQL数据库

2,下载地址:http://sourceforge.net/projects/benchmarksql/?source=navbar

Required:JDK7

3,解压 unzip benchmarksql-4.1.0.zip

4,修改benchmark的数据库连接配置信息

测试参数根据自己的情况和需要设置

[postgres@localhost run]$ vi props.pg
driver=org.postgresql.Driver
conn=jdbc:postgresql://localhost:5432/benchmarksql#可配置
user=benchmarksql#可配置
password=password#可配置
warehouses=1#可配置
terminals=1#配置
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=10#可配置为0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=0#可配置测试时间
//Number of total transactions per minute
limitTxnsPerMin=300
//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 & 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
5,创建测试用户名和密码 和测试数据库
postgres=# create user benchmarksql with superuser password 'password';
CREATE ROLE
postgres=# create database benchmarksql owner benchmarksql;
CREATE DATABASE
6,创建测试表结构
./runSQL.sh props.pg sqlTableCreates
7,查看已经创建的表结构
 ./psql benchmarksql benchmarksql
\dt+
8,导入测试数据
 ./runLoader.sh props.pg numWarehouses 1
9,为测试表创建索引
./runSQL.sh props.pg sqlIndexCreates
10,在benchmark连接benchmark数据库用户下查看创建的索引
\di
11,开始测试
./runBenchmark.sh props.pg

最新文章

  1. Effective C++ -----条款49:了解new-handler 的行为
  2. 【数据结构】DFS求有向图的强连通分量
  3. Android带侧滑菜单和ToolBar的BaseActivity
  4. 对于JVM内存配置参数
  5. usb serial for android
  6. Python函数,参数,变量
  7. LD_PRELOAD
  8. JQuery弹出层,实现弹层切换,可显示可隐藏。
  9. IOS GCD 使用(一) 简介
  10. sql server 发布时提示'dbo.sysmergepublications'无效的解决办法
  11. Solr和IK分词器的整合
  12. private set
  13. 从移动硬盘开机,引导VHD(Win10)
  14. Ubuntu shutdown
  15. js获取世界不同时区的当前时间
  16. mongodb--Profiling慢查询详解
  17. linux下的一些操作命令
  18. 弹出层小插件之(一)sweetalert
  19. 使用js栈stack类的实现
  20. openproject安装与使用

热门文章

  1. CentOS Linux 加硬盘,分区和设置自动挂载
  2. 重温前端基础之-js排序算法
  3. Ajax :六个全局事件
  4. BootStrap学习(一)——BootStrap入门
  5. HTML基础——网站图片显示页面
  6. Set集合[HashSet,TreeSet,LinkedHashSet],Map集合[HashMap,HashTable,TreeMap]
  7. Mybatis传递多个参数的解决办法(三种)
  8. 大O时间复杂度
  9. 紫书 习题8-5 UVa 177 (找规律)
  10. POJ——T 1422 Air Raid