Thanks Renan! Reducing the fill factor has improved my update performance and I am now seeing the same time for updates as inserts. I look forward to any advancements PostgreSQL may make in the future to improve the performance of bulk DML operations. It would be amazing if they could be parallelized in the future. Best, Bill From: Renan Alves Fonseca <renanfonseca@xxxxxxxxx> Hello, Regarding the additional time for UPDATE, you can try the following: CREATE TABLE test3 ( My local test gives me almost the same time for INSERT (first insert) and UPDATES (following upserts). Regarding the overall problem, there is always room for improvement. I did a quick test with partitions, and I found out that Postgres will not parallelize the upserts for us. One solution could be to partition the records at the application level, creating one connection per partition. On the DB side, the partitions can be implemented as standard tables (using a union view on top of them) or actual partitions of a main table. However, this solution does not strictly respect the "one single transaction'"constraint... Regards, Renan Fonseca Em qui., 13 de mar. de 2025 às 08:40, <bill.poole@xxxxxxxxx> escreveu:
|