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

Re: java.lang.OutOfMemory Exception with a large number of inserts

From: "Arsalan Zaidi" <azaidi(at)directi(dot)com>
To: "PostgreSQL" <pgsql-interfaces(at)postgresql(dot)org>
Cc: "PostgreSQL jdbc list" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: java.lang.OutOfMemory Exception with a large number of inserts
Date: 2001-10-08 10:03:11
Message-ID: 008101c14fe0$74c4aec0$4301a8c0@directi.com (view raw or flat)
Thread:
Lists: pgsql-interfacespgsql-jdbc

Would it help if I moved this particular bit of code on to the server side
as a server side function?

Would there be a significant increase in speed/efficiency?

Thanks in advance.

--Arsalan

> break up you insert into several trunks.
>
>
> Arsalan Zaidi wrote:
>
> > Hi.
> >
> > At one point in my program, I was inserting a large number of rows
> > (~600,000) using a prepared statement. Here are some things I noticed.
> >
> > 1. It's very slow! :-)
> > 2. Initially, the cpu monitor shows a high level of cpu utilisation, but
> > this slowly drops off with a blip every second or so. Basically, things
slow
> > down as the process chugs along.
> > 3. I eventually get a java.Lang.OutOfMemory exception after approx
1:00 -
> > 1:30 hrs.
> >
> > I tried running the JVM with heap size set to 50 Mbytes. I still get the
out
> > of mem error.
> >
> > I can't use the 'load' command instead of individual inserts.
> >
> > Is there a faster/better way? Any ideas on how I can get rid of the out
of
> > mem errors?
> >
> > Thanks in advance
> >
> > --Arsalan
> > -------------------------------------------------
> > WAR IS PEACE
> > FREEDOM IS SLAVERY
> > IGNORANCE IS STRENGTH
> > --1984
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
>
>


In response to

pgsql-interfaces by date

Next:From: Tom LaneDate: 2001-10-08 14:35:00
Subject: Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot
Previous:From: Michael MeskesDate: 2001-10-08 08:11:32
Subject: Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot binary compatible (yet)

pgsql-jdbc by date

Next:From: Peter T MountDate: 2001-10-08 14:03:47
Subject: Fwd: Large Objects (please help)
Previous:From: Max LarssonDate: 2001-10-08 08:48:49
Subject: BLOB/Large objects

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