Re: pg_restore takes ages - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: pg_restore takes ages
Date
Msg-id 3F7D3393.8020608@persistent.co.in
Whole thread Raw
In response to pg_restore takes ages  (Alex <alex@meerkatsoft.com>)
List pgsql-general
Alex wrote:

> Hi,
> I use pg_restore to load a previously dumped database.  (10mil records).
> the load of the data runs quite fast but when starting creating the
> triggers for foreign keys it takes forever.
>
> Isnt there are a faster way. after all the triggers in the source db
> already made sure the data was clean.

You can try creating index/triggers first and load the data. At the end it will
take a while before you get a usable database with either approach but see what
works faster for you.

Personally I was in a situation where postgresql was hogging space while
creating index on a table that had 81M rows with 3GB disk footprint. I dropped
the table and recreated it. Also created index before loading data. The loading
was slow with this approach but it finished in 3 hours. And I had an updated
index as well. Just had to run vacuum over it.

Take your pick..

  Shridhar



pgsql-general by date:

Previous
From: "Robert Wille"
Date:
Subject: LC_COLLATE=C not working
Next
From: Peter Childs
Date:
Subject: Re: Type of application that use PostgreSQL