5

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?

1
  • 2
    What did you find when you tried both methods? Commented Aug 30, 2013 at 2:53

2 Answers 2

12

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.

1
3

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.

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.