pg_dump / load seems really slow..
pg_dump / load seems really slow..
От:
Chad <chadrosen@gmail.com>
Дата:
Howdy! I'm trying to build some fixture (test) data for a webapp I'm building for my company. To do this I've taken a dump of data from production, exported it using pg_dump, and load it via psql < The data that is exported from production is about 25K rows and 12MB. The dump takes less than a second but the load is taking 2 minutes. The load step seems really slow. I'm wondering if there are ways to tweak the system to load faster. Or, if the process cannot be spead up I guess I don't need all 25 rows.. Is there a way to export a query to file via command line? export: pg_dump forums --data-only --no-owner -t foo > import: psql forums <
Re: pg_dump / load seems really slow..
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Chad writes: > export: > pg_dump forums --data-only --no-owner -t foo > > The load step seems really slow. Don't use --data-only. Or if you must, look into dropping and recreating indexes and foreign keys. See http://www.postgresql.org/docs/8.3/static/populate.html (or the corresponding page for whatever PG version you are using). regards, tom lane