On Tue, 13 May 2003, Jay O'Connor wrote:
> 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?
Speed wise, here's my take on what's faster:
copy = X time.
insert 10,000 rows at a time in transactions: 2-10X time
insert all rows in autocommit, i.e. single transactions: (10^100)X
Of course, that last one is an exageration, but honestly, when you're
waiting on it, it feels that way. :-)