Re: Improving PostgreSQL insert performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux