pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Splivalo <mario.splivalo@megafon.hr>
To: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Inserting 'large' amounts of data
Date: Thu, 27 Aug 2009 00:25:56 +0200
Message-ID: <4A95B674.2020103@megafon.hr> (raw)
In-Reply-To: <4A956E17.9020607@hogranch.com>
References: <4A9562BC.8030804@megafon.hr>
	<4A956E17.9020607@hogranch.com>

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



view thread (10+ messages)  latest in thread

Message-ID: <4A95B674.2020103@megafon.hr>
Permalink:  ../4A95B674.2020103@megafon.hr/
Also on:    postgresql.org/message-id/4A95B674.2020103@megafon.hr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mario.splivalo@megafon.hr, pierce@hogranch.com
  Subject: Re: Inserting 'large' amounts of data
  In-Reply-To: <4A95B674.2020103@megafon.hr>
  References: <4A9562BC.8030804@megafon.hr> <4A956E17.9020607@hogranch.com> <4A95B674.2020103@megafon.hr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox