pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Browne <cbbrowne@libertyrms.info>
To: pgsql-admin@postgresql.org
Subject: Re: [pg 7.1.rc2] pg_restore and large tables
Date: Wed, 12 Nov 2003 13:46:00 -0500
Message-ID: <60znf18lxz.fsf@dev6.int.libertyrms.info> (raw)
References: <20031112165534.98881.qmail@web21401.mail.yahoo.com>
	<1D4EFAB0-1538-11D8-B38B-000393A5890E@shanewright.co.uk>

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)



view thread (4+ messages)

Message-ID: <60znf18lxz.fsf@dev6.int.libertyrms.info>
Permalink:  ../60znf18lxz.fsf@dev6.int.libertyrms.info/
Also on:    postgresql.org/message-id/60znf18lxz.fsf@dev6.int.libertyrms.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: cbbrowne@libertyrms.info
  Subject: Re: [pg 7.1.rc2] pg_restore and large tables
  In-Reply-To: <60znf18lxz.fsf@dev6.int.libertyrms.info>
  References: <20031112165534.98881.qmail@web21401.mail.yahoo.com> <1D4EFAB0-1538-11D8-B38B-000393A5890E@shanewright.co.uk> <60znf18lxz.fsf@dev6.int.libertyrms.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox