X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E9517D1B55A for ; Wed, 12 Nov 2003 19:19:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 49835-02 for ; Wed, 12 Nov 2003 15:18:35 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 4A7C3D1B521 for ; Wed, 12 Nov 2003 15:18:34 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id hACJIYNu045945 for ; Wed, 12 Nov 2003 19:18:34 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id hACJA1C2043855 for pgsql-admin@postgresql.org; Wed, 12 Nov 2003 19:10:01 GMT From: Christopher Browne X-Newsgroups: comp.databases.postgresql.admin Subject: Re: [pg 7.1.rc2] pg_restore and large tables Date: Wed, 12 Nov 2003 13:46:00 -0500 Organization: Hub.Org Networking Services Lines: 27 Message-ID: <60znf18lxz.fsf@dev6.int.libertyrms.info> References: <20031112165534.98881.qmail@web21401.mail.yahoo.com> <1D4EFAB0-1538-11D8-B38B-000393A5890E@shanewright.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Reasonable Discussion, linux) Cancel-Lock: sha1:rFEiD/Dh5gKRV7aIU1/7mrJb4ng= To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/215 X-Sequence-Number: 11202 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: -- output = reverse("ofni.smrytrebil" "@" "enworbbc") Christopher Browne (416) 646 3304 x124 (land)