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 96F2BD1B8B9 for ; Mon, 17 Nov 2003 04:15:08 +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 81933-05 for ; Mon, 17 Nov 2003 00:14:37 -0400 (AST) Received: from web21402.mail.yahoo.com (web21402.mail.yahoo.com [216.136.232.72]) by svr1.postgresql.org (Postfix) with SMTP id 4B121D1B55F for ; Mon, 17 Nov 2003 00:14:36 -0400 (AST) Message-ID: <20031117041435.13499.qmail@web21402.mail.yahoo.com> Received: from [64.81.205.234] by web21402.mail.yahoo.com via HTTP; Sun, 16 Nov 2003 20:14:35 PST Date: Sun, 16 Nov 2003 20:14:35 -0800 (PST) From: ow Subject: Re: pg_restore and FK constraints with large dbs To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/309 X-Sequence-Number: 11296 --- ow wrote: > Perhaps I should clarify. > > First, I ran pg_dump to extract schema and data *together*. Then I ran > pg_restore to restore the db. It took about 1 hour to create tables and copy > the data, then about 40 min to create indexes, then pg_restore spent 4.5 > hours > checking one (1) FK constraint (80M table with FKs against 20K table with > PKs) > > 4.5 hours to check one FK constraint - this is what I meant by bad > performance. > I'm looking for a way to suspend FK checks since data is coming from pg_dump > and, hence, it's clean. > No solution? Thanks __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree