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

Re: Inserting 'large' amounts of data

From: Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Inserting 'large' amounts of data
Date: 2009-08-26 22:25:56
Message-ID: 4A95B674.2020103@megafon.hr (view raw or flat)
Thread:
Lists: pgsql-jdbc
John R Pierce wrote:
> Mario Splivalo wrote:
>> I have a web application which allows users to upload a lot of phone
>> numbers. I need to store those numbers to a database. Usualy, one would
>> upload around 70k-100k of records, totaling around 2 MB in size.
>>
>> ...
>> t would one recommend as the best way to insert those data?
> 
> I believe you can use org.postgresql.copy.CopyIn() ...  there are 
> variants that use a writeToCopy() call to send the data, or a 
> java.io.InputStream, or a java.io.Reader ...

Yes, I gues this is the way to go. I'll have to upgrade to 8.4, but 
somehow I'd like to wait for a month or so before making the switch.

Thank you all.


	Mike

In response to

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2009-08-26 22:33:18
Subject: Re: Inserting 'large' amounts of data
Previous:From: Maciek SakrejdaDate: 2009-08-26 17:34:32
Subject: Re: Inserting 'large' amounts of data

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