Re: COPY ... FROM and index usage

From: "Josh Tolley" <eggyknap(at)gmail(dot)com>
To: "Reg Me Please" <regmeplease(at)gmail(dot)com>
Cc: "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY ... FROM and index usage
Date: 2007-11-04 13:59:10
Message-ID: e7e0a2570711040559r2cca6654m4139b30e02bc1094@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/4/07, Reg Me Please <regmeplease(at)gmail(dot)com> wrote:
> Hi all.
>
> I'd like to know whether the indexes on a table are updated or not during
> a "COPY ... FROM" request.
>
> That is, should I drop all indexes during a "COPY ... FROM" in order to gain
> the maximum speed to load data?
>
> Thanks.

Although questions of "which is faster" often depend very heavily on
the data involved, the database schema, the hardware, etc., typically
people find it best to drop all indexes during a large import and
recreate them afterward.

- Josh/eggyknap

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reg Me Please 2007-11-04 15:15:33 Re: COPY ... FROM and index usage
Previous Message Julio Cesar Sánchez González 2007-11-04 11:24:29 Re: Copy the database..