patternsqlMinor
Postgresql: Two concurrent COPY FROM
Viewed 0 times
postgresqltwofromconcurrentcopy
Problem
I'm importing several gigantic csv files into a table - so I'm wondering what would happen if I ran COPY FROM jobs concurrently?
Solution
If you're trying to speed things up, this is generally a good idea. I say "generally" because you can also speed things up by creating the table and loading data into in a single transaction, which reduces transaction logging. You'd have to test to see which is faster.
In PostgreSQL versions prior to 9.2 (currently in beta), the maximum number of concurrent beneficial COPYs tends to be 3. In 9.2 that goes up to at least 8, assuming you have the cores and I/O available.
In PostgreSQL versions prior to 9.2 (currently in beta), the maximum number of concurrent beneficial COPYs tends to be 3. In 9.2 that goes up to at least 8, assuming you have the cores and I/O available.
Context
StackExchange Database Administrators Q#20723, answer score: 4
Revisions (0)
No revisions yet.