From: ow <oneway_111@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: pg_restore and FK constraints with large dbs
Date: Thu, 13 Nov 2003 14:02:41 -0800 (PST)
Message-ID: <20031113220241.94962.qmail@web21401.mail.yahoo.com> (raw)
pgSql 7.4.rc2
Hi,
Am somewhat lost about how one should use pg_restore with large dbs. For
simplicity, let's assume that db has only one (1) table with huge amout of
rows. Tried several approaches:
1) dump the data only, create the table with all indexes and constraints (from
script that has nothing to do with pg_restore), import the data. The import
part was running for hours (14+) with no end in sight. Had to kill it.
2) dump the data only, create the table with no indexes or constraints, import
the data, recreate indexes and constraints.
This approach produced better results. Data were imported in about two (2)
hours, indexes also were created fairly quickly. Howerver, creattion of FK
constraints is killing performance again. It appears in the past there was some
discussion regarding the ability to create a FK constraint without actually
checking the records. It makes a lot of sense when importing data from
pg_restore since data comes from db where the constraint was in place, hence
it's clean.
Any ideas? Thanks
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
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: oneway_111@yahoo.com
Subject: Re: pg_restore and FK constraints with large dbs
In-Reply-To: <20031113220241.94962.qmail@web21401.mail.yahoo.com>
References: <20031113220241.94962.qmail@web21401.mail.yahoo.com>
* 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