Skip to content

Instantly share code, notes, and snippets.

@jon-proulx
Created October 19, 2017 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jon-proulx/b5ef19d02b37107b0a10cedf0c803aee to your computer and use it in GitHub Desktop.
Save jon-proulx/b5ef19d02b37107b0a10cedf0c803aee to your computer and use it in GitHub Desktop.
$ time pgbench -r -c 4 -j 2 -T 300 testdb
starting vacuum...end.
transaction type: TPC-B (sort of)
scaling factor: 300
query mode: simple
number of clients: 4
number of threads: 2
duration: 300 s
number of transactions actually processed: 33237
tps = 110.786792 (including connections establishing)
tps = 110.792180 (excluding connections establishing)
statement latencies in milliseconds:
0.003371 \set nbranches 1 * :scale
0.000829 \set ntellers 10 * :scale
0.000846 \set naccounts 100000 * :scale
0.000987 \setrandom aid 1 :naccounts
0.000677 \setrandom bid 1 :nbranches
0.000769 \setrandom tid 1 :ntellers
0.000692 \setrandom delta -5000 5000
0.069564 BEGIN;
0.937153 UPDATE pgbench_accounts SET abalance = abalance + :delta WHERE aid = :aid;
0.200149 SELECT abalance FROM pgbench_accounts WHERE aid = :aid;
0.232959 UPDATE pgbench_tellers SET tbalance = tbalance + :delta WHERE tid = :tid;
0.477838 UPDATE pgbench_branches SET bbalance = bbalance + :delta WHERE bid = :bid;
0.173930 INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
33.993575 END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment