Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-odbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group