Re: [INTERFACES] Fastest import?

From: "Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: matthew(at)venux(dot)net (Matthew Hagerty)
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Fastest import?
Date: 1999-04-11 09:55:57
Message-ID: E10WGy5-0004V5-00@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Wybo Dekker 1999-04-11 12:29:53 Re: [INTERFACES] Fastest import?
Previous Message Peter T Mount 1999-04-11 08:21:36 Re: [INTERFACES] Fastest import?