I recently did some testing on this with jdbc and managed 3M rows per second on an M1 mac with copy in a single thread however you lose the ability to use on conflict ....
It's possible to improve the performance of inserts I found by replacing values (..., ...), (..., ...) with select unnest(?), unnest(?) with each ? representing an array of values for column1, column2, this method was 3x faster than values in my tests at 850k rows per second.
(Lib used for copy with jdbc github.com/PgBulkInsert/PgBulkInsert)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I recently did some testing on this with jdbc and managed 3M rows per second on an M1 mac with copy in a single thread however you lose the ability to use
on conflict ....It's possible to improve the performance of inserts I found by replacing
values (..., ...), (..., ...)withselect unnest(?), unnest(?)with each?representing an array of values forcolumn1, column2, this method was 3x faster thanvaluesin my tests at 850k rows per second.(Lib used for copy with jdbc github.com/PgBulkInsert/PgBulkInsert)