Re: COPY versus INSERT

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: "Jay O'Connor" <joconnor(at)cybermesa(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY versus INSERT
Date: 2003-05-14 15:21:15
Message-ID: m3addpftas.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jay O'Connor" <joconnor(at)cybermesa(dot)com> writes:

> I'm loading a database with a lot of data from an external source (I'm
> convertin all my data to postgresql)
>
> Right now I'm just connecting to the database and issuing a whole lot of
> INSERTS and this is taking longer than I had planned.
>
> Would it be faster to just dump my database ina tab delimited format and
> use a COPY FROM or psql /copy command?

Most definitely--the SQL parser and planner have to be run for each
INSERT. The parsing done by COPY is much simpler.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-05-14 15:27:17 Re: COPY versus INSERT
Previous Message Mirco Tamburini 2003-05-14 15:18:47 Heterogeneous service (like Oracle or Ms SQL Server)