[postgres@cnsz92pl00192 data]$pgbench -M prepared -h 127.0.0.1 -p 10002 -n -r -f ~/data/test.sql -c 64 -j 64 -T 10
transaction type: /home/postgres/data/test.sql
scaling factor: 1
query mode: prepared
number of clients: 64
number of threads: 64
duration: 10 s
number of transactions actually processed: 49050
latency average = 13.107 ms
tps = 4882.839136 (including connections establishing)
tps = 8783.875162 (excluding connections establishing)
statement latencies in milliseconds:
0.002 \set id random(1,1000000)
7.225 select id from tbl_ip where id=:id;
[postgres@cnsz92pl00192 data]$pgbench -M prepared -h 127.0.0.1 -p 10002 -n -r -f ~/data/test.sql -c 64 -j 64 -T 20
transaction type: /home/postgres/data/test.sql
scaling factor: 1
query mode: prepared
number of clients: 64
number of threads: 64
duration: 20 s
number of transactions actually processed: 95789
latency average = 13.400 ms
tps = 4776.021870 (including connections establishing)
tps = 8375.462545 (excluding connections establishing)
statement latencies in milliseconds:
0.002 \set id random(1,1000000)
7.583 select id from tbl_ip where id=:id;
[postgres@cnsz92pl00192 data]$pgbench -M prepared -h 127.0.0.1 -p 10002 -n -r -f ~/data/test.sql -c 128 -j 128 -T 20
transaction type: /home/postgres/data/test.sql
scaling factor: 1
query mode: prepared
number of clients: 128
number of threads: 128
duration: 20 s
number of transactions actually processed: 105182
latency average = 24.477 ms
tps = 5229.411053 (including connections establishing)
tps = 18263.330523 (excluding connections establishing)
statement latencies in milliseconds:
0.001 \set id random(1,1000000)
6.890 select id from tbl_ip where id=:id;
本问题来自云栖社区【PostgreSQL技术进阶社群】。https://yq.aliyun.com/articles/690084 点击链接欢迎加入社区大社群。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。