Search Postgresql Archives

Re: Multiple COPY statements for one table vs one for ~half a billion records

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

 



On Thu, Apr 4, 2024 at 2:04 PM Carl L <cllewellyno@xxxxxxxxx> wrote:
Hi there,

I have around half a billion records that are being generated from a back end that are split into 80 threads (one per core) and I'm performing a copy from memory ( from stdin binary) into Postgres from each of these threads - i.e. there are 80 COPY statements being generated for one table that are running concurrently. I can see each of the Postgres processes sitting at around 15% CPU usage.

Is the target table partitioned in the same way that the input data is split?

That would make things faster...
 
These are all also in the same transaction - I am the only one connected, so it's not an issue to hold a big transaction.

Unless it fills up your WAL partition.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux