Re: pg 7.4.x - pg_restore impossibly slow - Mailing list pgsql-performance

From Tom Lane
Subject Re: pg 7.4.x - pg_restore impossibly slow
Date
Msg-id 4413.1144984517@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg 7.4.x - pg_restore impossibly slow  ("patrick keshishian" <pkeshish@gmail.com>)
Responses Re: pg 7.4.x - pg_restore impossibly slow
List pgsql-performance
"patrick keshishian" <pkeshish@gmail.com> writes:
> With these settings and running:
> pg_restore -vaOd dbname dbname.DUMP

If you had mentioned you were using random nondefault switches, we'd
have told you not to.  -a in particular is a horrid idea performancewise
--- a standard schema-plus-data restore goes way faster because it's
doing index builds and foreign key checks wholesale instead of
incrementally.

> Is this because the -c option drops all foreign keys and
> so the restore goes faster?  Should this be the preferred,
> recommended and documented method to run pg_restore?

It is documented in recent versions of the documentation: see
http://www.postgresql.org/docs/8.1/static/populate.html
particularly the last section.

            regards, tom lane

pgsql-performance by date:

Previous
From: "patrick keshishian"
Date:
Subject: Re: pg 7.4.x - pg_restore impossibly slow
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Inserts optimization?