Re: Best way to import data in postgresl (not "COPY") - Mailing list pgsql-odbc

From Sufficool, Stanley
Subject Re: Best way to import data in postgresl (not "COPY")
Date
Msg-id C2F174F99918D54CA2A96E57C5079B6F015C4230@sbc-exmsg2.sbcounty.gov
Whole thread Raw
In response to Best way to import data in postgresl (not "COPY")  (Denis BUCHER <dbucherml@hsolutions.ch>)
List pgsql-odbc
You could group the insert into batches using:

INSERT INTO table (field1, field2)
Select value1, value2
Union all Select value1, value2
Union all Select value1, value2
Union all Select value1, value2
Union all Select value1, value2
Union all Select value1, value2;


> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Denis BUCHER
> Sent: Wednesday, July 22, 2009 11:31 AM
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Best way to import data in postgresl (not "COPY")
>
>
> 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
>
> --
> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc
>

pgsql-odbc by date:

Previous
From: "Jeff Crumbley"
Date:
Subject: Re: Best way to import data in postgresl (not "COPY")
Next
From: fatmijumar fatmijumar
Date:
Subject: possible bug with casting of STDDEV arguments