Pgbench

出自兆芯CPU与嵌入式系统
於 2019年10月18日 (五) 11:11 由 Xull留言 | 貢獻 所做的修訂
跳至導覽 跳至搜尋
#1个session,读写性能
 ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench
starting vacuum...end.
transaction type: <builtin: TPC-B (sort of)>
scaling factor: 714
query mode: simple
number of clients: 1
number of threads: 1
duration: 300 s
number of transactions actually processed: 62602
latency average = 4.792 ms
tps = 208.672446 (including connections establishing)
tps = 208.675069 (excluding connections establishing)
##1个session,只读性能
root@debian:~/xull/pgsql/bin# ./pgbench -h 192.168.10.156 -U pgbench -c 1 -T 300 -r pgbench -S  
Password: 
starting vacuum...end.
transaction type: <builtin: select only>
scaling factor: 714
query mode: simple
number of clients: 1
number of threads: 1
duration: 300 s
number of transactions actually processed: 294834
latency average = 1.018 ms
tps = 982.778611 (including connections establishing)
tps = 982.790906 (excluding connections establishing)
script statistics:
 - statement latencies in milliseconds:
         0.003  \set aid random(1, 100000 * :scale)
         1.010  SELECT abalance FROM pgbench_accounts WHERE aid = :aid;