pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Harkness <daveh@MEconomy.com>
To: Arsalan Zaidi <azaidi@directi.com>
Cc: PostgreSQL jdbc list <pgsql-jdbc@postgresql.org>
Subject: Re: java.lang.OutOfMemory Exception with a large number
Date: Wed, 03 Oct 2001 12:44:17 -0700
Message-ID: <5.1.0.14.2.20011003124129.00abc7e0@mail.meconomy.com> (raw)
In-Reply-To: <005701c14bda$dedf1480$4301a8c0@directi.com>

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




view thread (3+ messages)

Message-ID: <5.1.0.14.2.20011003124129.00abc7e0@mail.meconomy.com>
Permalink:  ../5.1.0.14.2.20011003124129.00abc7e0@mail.meconomy.com/
Also on:    postgresql.org/message-id/5.1.0.14.2.20011003124129.00abc7e0@mail.meconomy.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: daveh@MEconomy.com, azaidi@directi.com, pgsql-jdbc@postgresql.org
  Subject: Re: java.lang.OutOfMemory Exception with a large number
  In-Reply-To: <5.1.0.14.2.20011003124129.00abc7e0@mail.meconomy.com>

* 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