Re: [INTERFACES] Fastest import? - Mailing list pgsql-interfaces

From Patrick Welche
Subject Re: [INTERFACES] Fastest import?
Date
Msg-id E10WGy5-0004V5-00@quartz.newn.cam.ac.uk
Whole thread Raw
In response to Fastest import?  (Matthew Hagerty <matthew@venux.net>)
List pgsql-interfaces
> What is the fastest way to import data from an ASCII file?  I have ~17,000
> records in a .DBF file that I need to get into my pg6.4.2 database.  I have
> written a program that reads the .DBF file, massages the data and writes it
> out to a text file, one record per line.

Funny, I just reinvented the wheel too on Friday.

> I initially had my program issue the insert commands instead of writing
> them to a text file, but the import took about 2 hours!

Did you surround the inserts with "BEGIN WORK" and "COMMIT"? That is
rumoured to help - I only had 6000 rows, so it wasn't a problem.

Re the text file, are you using "INSERT" or better "COPY"?


Cheers,

Patrick

pgsql-interfaces by date:

Previous
From: "Gary Smith"
Date:
Subject: questions
Next
From: Peter T Mount
Date:
Subject: Re: [INTERFACES] Fastest import?