pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedjava.lang.OutOfMemory Exception with a large number of inserts
3+ messages / 3 participants
[nested] [flat]
* java.lang.OutOfMemory Exception with a large number of inserts
@ 2001-10-03 07:13 Arsalan Zaidi <azaidi@directi.com>
0 siblings, 2 replies; 3+ messages in thread
From: Arsalan Zaidi @ 2001-10-03 07:13 UTC (permalink / raw)
To: pgsql-interfaces; +Cc: PostgreSQL jdbc list <pgsql-jdbc@postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: java.lang.OutOfMemory Exception with a large number of inserts
@ 2001-10-03 17:45 Rene Pijlman <rene@lab.applinet.nl>
parent: Arsalan Zaidi <azaidi@directi.com>
1 sibling, 0 replies; 3+ messages in thread
From: Rene Pijlman @ 2001-10-03 17:45 UTC (permalink / raw)
To: Arsalan Zaidi <azaidi@directi.com>; +Cc: PostgreSQL jdbc list <pgsql-jdbc@postgresql.org>
On Wed, 3 Oct 2001 12:43:12 +0530, you wrote:
>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.
Can you post a code snippet that reproduces the problem?
Regards,
René Pijlman <rene@lab.applinet.nl>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: java.lang.OutOfMemory Exception with a large number
@ 2001-10-03 19:44 Dave Harkness <daveh@MEconomy.com>
parent: Arsalan Zaidi <azaidi@directi.com>
1 sibling, 0 replies; 3+ messages in thread
From: Dave Harkness @ 2001-10-03 19:44 UTC (permalink / raw)
To: Arsalan Zaidi <azaidi@directi.com>; +Cc: PostgreSQL jdbc list <pgsql-jdbc@postgresql.org>
At 12:13 AM 10/3/2001, Arsalan Zaidi wrote:
>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.
This is a total guess, but is it possible that the PreparedStatement is
gathering warnings on every execution? Try doing
stmt.clearWarnings();
inside the loop. I assume that setting parameter values replaces old values
immediately, so there''s no real reason to do
stmt.clearParameters();
each time as well, but it probably couldn't hurt. :)
Peace,
Dave
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-10-03 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-03 07:13 java.lang.OutOfMemory Exception with a large number of inserts Arsalan Zaidi <azaidi@directi.com>
2001-10-03 17:45 ` Rene Pijlman <rene@lab.applinet.nl>
2001-10-03 19:44 ` Re: java.lang.OutOfMemory Exception with a large number Dave Harkness <daveh@MEconomy.com>
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