Take the 2-minute tour ×
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. It's 100% free, no registration required.

There are 2 main formats for pg_dump: custom vs sql. For custom, it's compressed by default, and not readable if you try to open it. But is it faster to dump into this format as opposed to SQL format. Or is the speed the same?

share|improve this question

migrated from stackoverflow.com Aug 30 '13 at 23:17

This question came from our site for professional and enthusiast programmers.

2  
What did you find when you tried both methods? –  Greg Hewgill Aug 30 '13 at 2:53

2 Answers 2

Time it and see. Which is fastest will depend on the balance of CPU to disk I/O on your system. If CPU is abundant and the disk is slow, a -Fc dump will be faster. If CPU is very limited and the disk is fast, an SQL dump might be faster.

I strongly recommend using -Fc custom format dumps anyway. They're much more flexible, and while you can convert a custom format dump into an SQL format dump you can't do the reverse easily.

share|improve this answer

You can dump | gzip the plain SQL format for compression before writing to disk as well, but an advantage of the custom format for performance are parallel restores (-j option), and parallel dumps are forthcoming.

share|improve this answer

Your Answer

 
discard

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.