Hi All,
--
I have two servers. On the first one I have postgresql version 9.6 . On the second one I have version 9.3 . I ran pgbench on both servers.
First server results:
scaling factor: 10
query mode: simple
number of clients: 1
number of threads: 1
duration: 10 s
number of transactions actually processed: 4639
latency average = 2.156 ms
tps = 463.818971 (including connections establishing)
tps = 464.017489 (excluding connections establishing)
Second server results:
scaling factor: 10
query mode: simple
number of clients: 1
number of threads: 1
duration: 10 s
number of transactions actually processed: 3771
tps = 377.084162 (including connections establishing)
tps = 377.134546 (excluding connections establishing)
So first server perform much better.
BUT if I run a trivial select on both servers, on a similar table, the select perform much much better on second server!
First server explain results:
Limit (cost=0.00..0.83 rows=30 width=33) (actual time=0.152..0.794 rows=30 loops=1)
Buffers: shared hit=1
-> Seq Scan on symbols_tests (cost=0.00..1.57 rows=57 width=33) (actual time=0.040..0.261 rows=30 loops=1)
Buffers: shared hit=1
Planning time: 0.282 ms
Execution time: 1.062 ms
Second server explain results:
Limit (cost=0.00..0.83 rows=30 width=622) (actual time=0.006..0.010 rows=30 loops=1)
Buffers: shared hit=1
-> Seq Scan on symbols_tests (cost=0.00..1.57 rows=57 width=622) (actual time=0.006..0.007 rows=30 loops=1)
Buffers: shared hit=1
Total runtime: 0.020 ms
Both servers have SSD. First server is a VPS, the second server is a dedicated server.
Any idea why this contradiction ? If you need more details regarding server resources(CPU, memory etc) please let me know.
Regards