Re: [pg 7.1.rc2] pg_restore and large tables - Mailing list pgsql-admin

From Christopher Browne
Subject Re: [pg 7.1.rc2] pg_restore and large tables
Date
Msg-id 60znf18lxz.fsf@dev6.int.libertyrms.info
Whole thread Raw
In response to [pg 7.1.rc2] pg_restore and large tables  (ow <oneway_111@yahoo.com>)
List pgsql-admin
me@shanewright.co.uk (Shane Wright) writes:
> I have found, on 7.3.4, a _massive_ performance difference on
> restoring without indices - on a 25million row table from 8 hours down
> to <1 hour!
>
> I've found the best way is to do this... (there may be a script
> somewhere that automates this)
>
> - do a --schema-only restore to create the tables
>
> - manually drop the indices using psql
>
> - do a --data-only restore, also using --disable-triggers
>
> - manually recreate the indices.
>
> IIRC, it also helps to turn off fsync

None of this should come as any great surprise...  All but the "turn
off fsync" part is described in the documentation tree thus:

   <http://www.postgresql.org/docs/7.2/interactive/populate.html>
--
output = reverse("ofni.smrytrebil" "@" "enworbbc")
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 646 3304 x124 (land)

pgsql-admin by date:

Previous
From: pginfo
Date:
Subject: Re: vacuum full problem
Next
From: Denis Dahsulja
Date:
Subject: broken pipe