| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | "patrick keshishian" <pkeshish(at)gmail(dot)com> | 
| Cc: | pgsql-performance(at)postgresql(dot)org | 
| Subject: | Re: pg 7.4.x - pg_restore impossibly slow | 
| Date: | 2006-04-14 03:15:17 | 
| Message-ID: | 4413.1144984517@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-performance | 
"patrick keshishian" <pkeshish(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim C. Nasby | 2006-04-14 05:59:23 | Re: Inserts optimization? | 
| Previous Message | patrick keshishian | 2006-04-14 01:26:00 | Re: pg 7.4.x - pg_restore impossibly slow |