I generated a dump file of 21 MB or so:
pg_dump --format=tar --verbose --file=database.backup mydatabase
When I import this file on windows doing:
pg_restore --dbname mydatabase --verbose database.backup
It takes 1 hour to be done.
Doing the same on Ubuntu 10.10 64bits boxes, takes about 7 hours!
Of course I'm talking about the same hardware specs (Dell Studio XPS). Same RAM, CPU, etc.
In both cases I'm using out of box configs for PostgreSQL 8.4.7.
Perhaps the distros configuration is different... Perhaps some optimization that just windows distro is doing?
Extra info: On Windows 7 -> NTFS. On Ubuntu 10.10 -> ext4
When I do
pg_dump --format=tar --verbose --file=workspace/work/dumps/loaded.backup mydb
I takes only 5 seconds! If I restore on an empty new db doing:
pg_restore --dbname mydb-2 --verbose workspace/work/dumps/loaded.backup
I takes only 10 seconds. (Problem solved?... almost) It seems the db guys exported the original dump using different options. Perhaps --inserts option?
The big difference between Windows and Ubuntu using the original dump is still bothering my mind. Any thoughts on this?