From: | Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com> |
---|---|
To: | Frits Jalvingh <jal(at)etc(dot)to> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Subject: | Re: Improving PostgreSQL insert performance |
Date: | 2017-06-11 09:30:29 |
Message-ID: | CAB=Je-EfJ3um4BnXxL-xHEYL9BOc4dA5=ux0-h=S64Zxxnc9_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Alvaro>Something like
INSERT INTO .. VALUES ('col1', 'col2'), ('col1', 'col2'), ('col1', 'col2')>I
did not
Frits>try that, to be honest.
pgjdbc does automatically rewrite insert values(); into insert ...
values(),(),(),() when reWriteBatchedInserts=true. I don't expect manual
multivalues to be noticeably faster there.
Frits>https://etc.to/confluence/display/~admjal/PostgreSQL+performance+tests
Do you really intend to measure just a single insert operation?
It looks odd, as typical applications would execute inserts for quite a
while before they terminate.
You are including lots of warmup overheads (e.g. JIT-compilation), so your
approach does not measure peak performance.
On the other hand, you are not measuring enough time to catch things like
"DB log switch".
Would you please use JMH as a load driver?
Here's an example:
https://github.com/pgjdbc/pgjdbc/blob/master/ubenchmark/src/main/java/org/postgresql/benchmark/statement/InsertBatch.java
Vladimir
>
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-06-11 12:36:48 | Re: Improving PostgreSQL insert performance |
Previous Message | Frits Jalvingh | 2017-06-11 08:44:04 | Re: Improving PostgreSQL insert performance |