Best way to import data in postgresl (not "COPY")

From: Denis BUCHER <dbucherml(at)hsolutions(dot)ch>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Best way to import data in postgresl (not "COPY")
Date: 2009-07-22 18:31:18
Message-ID: 4A675AF6.2070406@hsolutions.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hello,

I have a system that must each day import lots of data from another one.
Our system is in postgresql and we connect to the other via ODBC.

Currently we do something like :

SELECT ... FROM ODBC source
foreach row {
INSERT INTO postgresql
}

The problem is that this method is very slow...

More especially that for each row we do :
field1 = ...
field2 = ...
And then
$sql_insert = "INSERT ..." . field1 ....

Does someone has a better suggestion ?

Thanks a lot in advance !

Denis

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Jeff Crumbley 2009-07-22 19:39:36 Re: Best way to import data in postgresl (not "COPY")
Previous Message Preeti Khurana 2009-07-22 17:02:30 Config file used for UseDeclareFetch option