Re: [pg 7.1.rc2] pg_restore and large tables

From: Christopher Browne <cbbrowne(at)libertyrms(dot)info>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: [pg 7.1.rc2] pg_restore and large tables
Date: 2003-11-12 18:46:00
Message-ID: 60znf18lxz.fsf@dev6.int.libertyrms.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

me(at)shanewright(dot)co(dot)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)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message ow 2003-11-12 20:07:23 Taking database offline
Previous Message Andrew Sullivan 2003-11-12 18:22:19 Re: Upgrading to Solaris 9