COPY speedup

From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: COPY speedup
Date: 2007-12-13 17:36:43
Message-ID: 200712131836.43349.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all.
In order to speed up the COPY ... FROM ... command, I've
disabled everything (primary key, not null, references, default and indexes)
in the table definition before doing the actual COPY.
Later I can restore them with ALTER TABLE ... and CREATE INDEX ...

My question is: is all this necessary, or could I save some of them (maybe
just the DEFAULT) with no speed cost?

Is there a way to "automate" this by using the information_schema?

Many thanks in advance.

--
Reg me, please!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message André Volpato 2007-12-13 17:55:36 Hash join in 8.3
Previous Message Mark Wimer 2007-12-13 17:23:39 Re: SQL Query