Re: COPY and indices?

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: François Beausoleil <francois(at)teksol(dot)info>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY and indices?
Date: 2012-03-13 05:22:49
Message-ID: CAOR=d=3JRq1d8SY9+8DNWoME-Spo0j+1sMEpWoamy1RBrAyYUw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2012/3/12 François Beausoleil <francois(at)teksol(dot)info>:
> Hi all,
>
> When using COPY FROM STDIN to stream thousands of rows (20k and more hourly), what happens with indices? Are they updated only once after the operation, or are they updated once per row? Note that I'm not replacing the table's data: I'm appending to what's already there. I suspect batching writes will be faster than writing each individual row using an INSERT statement.

Copy is faster, but if a single row fails (dup key etc) the whole copy fails.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hamann.w 2012-03-13 06:51:48 Re: COPY and indices?
Previous Message Ondrej Ivanič 2012-03-13 04:36:54 Re: COPY and indices?