Re: [INTERFACES] Fastest import?

Поиск
Список
Период
Сортировка
От Patrick Welche
Тема Re: [INTERFACES] Fastest import?
Дата
Msg-id E10WGy5-0004V5-00@quartz.newn.cam.ac.uk
обсуждение исходный текст
Ответ на Fastest import?  (Matthew Hagerty <matthew@venux.net>)
Список 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 по дате отправления:

Предыдущее
От: "Gary Smith"
Дата:
Сообщение: questions
Следующее
От: Peter T Mount
Дата:
Сообщение: Re: [INTERFACES] Fastest import?