Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm importing several gigantic csv files into a table - so I'm wondering what would happen if I ran COPY FROM jobs concurrently?

share|improve this question
up vote 4 down vote accepted

It just works, like it should. It doesn't lock the table, so start testing.

share|improve this answer

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.

share|improve this answer
Not that I doubt your word, but can you provide a source on why "the maximum number of concurrent beneficial COPYs tends to be 3"? – Derek Downey Jul 12 '12 at 14:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.