pg_restore and FK constraints with large dbs

Поиск
Список
Период
Сортировка
От ow
Тема pg_restore and FK constraints with large dbs
Дата
Msg-id 20031113220241.94962.qmail@web21401.mail.yahoo.com
обсуждение исходный текст
Ответы Re: pg_restore and FK constraints with large dbs  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Greg Spiegelberg
Дата:
Сообщение: Moving Database Directory
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Moving Database Directory