agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] java.lang.OutOfMemoryError
Date: Wed, 28 Jun 2006 15:42:15 +0200
Message-ID: <44A28737.7090200@tada.se> (raw)
In-Reply-To: <44A28420.5010108@insa-toulouse.fr>
References: <4492740D.4040302@insa-toulouse.fr>
<4492BB01.5060205@tada.se>
<44965774.7050203@insa-toulouse.fr>
<44966070.4040806@tada.se>
<44A134C6.5030003@insa-toulouse.fr>
<44A13A99.60406@tada.se>
<44A258BA.10605@insa-toulouse.fr>
<44A25C49.6010907@tada.se>
<44A27A46.6030407@insa-toulouse.fr>
<44A27CD6.6090608@tada.se>
<44A28420.5010108@insa-toulouse.fr>
Eric BOYER wrote:
> Thomas Hallgren a ?crit :
>
>> Eric BOYER wrote:
>>
>>
>>> just one thing
>>>
>>> We always use the fonction execute and never executeUpdate for our
>>> operations ...
>>>
>>>
>>> is it important ?
>>>
>>>
>> It might be. If the query is producing a ResultSet (any 'SELECT ...'
>> that is not a 'SELECT ... INTO' will do that) and you forget to close
>> the statement, then you leave the ResultSet dangling.
>>
>>
> We close all resultset !
Yes, provided you obtain it. What I meant to say was that the following
code:
stmt.execute("SELECT someFunction()");
will actually create a ResultSet. So unless it's followed by either:
stmt.getResultSet().close();
or simply:
stmt.close(),
you will leave that set dangling. In fact, this code:
stmt.execute("SELECT someFunction1()");
stmt.execute("SELECT someFunction2()");
will leak since there's no close in between. That's a bug in PL/Java,
the execute should make sure that the statement is closed prior to
executing (it does now).
> The long treatment for the data insertion last about 30 heures !
>
For 5000 inserts? That's about 20 seconds per account! I guess you're
mostly waiting on the LDAP connection then?
Regards,
Thomas Hallgren
view thread (14+ messages) latest in thread
Message-ID: <44A28737.7090200@tada.se>
Permalink: ../44A28737.7090200@tada.se/
Also on: postgresql.org/message-id/44A28737.7090200@tada.se
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: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] java.lang.OutOfMemoryError
In-Reply-To: <44A28737.7090200@tada.se>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox