Re: [HACKERS] Insert values() per-statement overhead

2016-01-15 Thread Andres Freund
On 2016-01-15 13:17:12 +0300, Vladimir Sitnikov wrote: > There is a finding that insert(x) values(y);insert(x) values(z); is > 2-4 times slower than insert(..) values(y),(z); > see [1], [2]. If you indeed just mean statements like above, without begin/commit, a large portion of the overhead will

[HACKERS] Insert values() per-statement overhead

2016-01-15 Thread Vladimir Sitnikov
Hi, There is a finding that insert(x) values(y);insert(x) values(z); is 2-4 times slower than insert(..) values(y),(z); see [1], [2]. In other words, there is a significant per-statement overhead even though server-prepared statements are properly used. The issue is reproducible in 9.5rc1. Is

Re: [HACKERS] Insert values() per-statement overhead

2016-01-15 Thread Vladimir Sitnikov
>I guess you mean there's a transaction surrounding it? Sure there is a transaction. I measure the latency from the first Bind message to the ReadyForQuery response. The database is at localhost. The flow is as follows (I've use 4 queries in batch for brevity, however the test above is executed