Re: bulk inserts - Mailing list pgsql-general

From Grzegorz Jaśkiewicz
Subject Re: bulk inserts
Date
Msg-id 2f4958ff0909290735p640dd3e4r62987e786ea46070@mail.gmail.com
Whole thread Raw
In response to Re: bulk inserts  (Dave Huber <DHuber@letourneautechnologies.com>)
List pgsql-general


On Tue, Sep 29, 2009 at 3:31 PM, Dave Huber <DHuber@letourneautechnologies.com> wrote:

All I have to say is wow! COPY works sooo much faster than the iterative method I was using. Even after having to read the entire binary file and reformat the data into the binary format that postgres needs it is an order of magnitude faster than using a prepared INSERT. At least that’s what my prelim testing is showing me. I will have to let it run for a while with a larger table to see how it performs in the longrun, but initially this is very positive.

you can also try wrapping whole bunch of inserts in a transaction block. 


--
GJ

pgsql-general by date:

Previous
From: Dave Huber
Date:
Subject: Re: bulk inserts
Next
From: Tom Lane
Date:
Subject: Re: query is taking longer time after a while