Re: why restoring a dump file is sooo slow

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: why restoring a dump file is sooo slow
Date: 2003-04-26 15:45:07
Message-ID: 1051371907.6974.142.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 2003-04-26 at 07:05, Mike Mascari wrote:
> Reynard Hilman wrote:
> > Hi,
> >
> > I'm trying to restore a dump file that I created using:
> > pg_dump -CD dbname > dump.sql
> >
> > the dump file size is about 87 Mb.
> >
> > so I did this to restore:
> > psql -f dump.sql -U user template1
> >
> > It takes almost an hour and a half to restore the database.
>
> This there a reason you are using the 'D' option to dump the database
> as INSERTs? A dump which uses COPY (the default) instead will reload
> much more quickly.

Also, are there triggers on the tables? There's a pg_dump
option to ensure that they don't get activated during restore.

--
+-----------------------------------------------------------+
| Ron Johnson, Jr. Home: ron(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA http://members.cox.net/ron.l.johnson |
| |
| An ad currently being run by the NEA (the US's biggest |
| public school TEACHERS UNION) asks a teenager if he can |
| find sodium and *chloride* in the periodic table of the |
| elements. |
| And they wonder why people think public schools suck... |
+-----------------------------------------------------------+

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2003-04-26 16:46:54 Re: where can i download pgsql for windows?
Previous Message Ron Johnson 2003-04-26 12:43:29 Re: Backing up 16TB of data (was Re: > 16TB worth of