Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tested with PostgreSQL 9.3.
- === Sql Script Body To Test Example ===
- \setrandom u1v 1 100000
- \setrandom u2v 20000 20999
- \setrandom u 1 50000
- \setrandom r1 20000 20999
- \setrandom r2 20000 20999
- \setrandom r3 20000 20999
- \setrandom r4 20000 20999
- \setrandom r5 20000 20999
- \setrandom r6 1 100000
- \setrandom r7 1 100000
- \setrandom r8 1 100000
- \setrandom r9 1 100000
- \setrandom r10 1 100000
- select * from foo where (u1 = :u1v and u2 in (:r1, :r2, :r3, :r4, :r5)) or (u2 = :u2v and u1 in (:r6, :r7, :r8, :r9, :r10));
- === Pgbench Run Line ===
- -c = number of concurrent database clients
- -f = script file path
- -j = number of threads (the clients are evenly distributed among this number of threads)
- -n = don't run VACUUM (docs require it be set in case of custom a script)
- -U = username
- test1 = database name
- pgbench.exe -c 10 -f C:/test.sql -j 10 -n -U root test1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement