ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankar" <fatboys...@gmail.com>
Subject Re: Avoid java heap space while using iBatis
Date Tue, 21 Oct 2008 16:35:57 GMT
HI Ankit,
               I would do a loop, fetching lesser number of rows each time.
I had a similar requirement, when I had to do a bulk fetch (basically a
nightly job which had to create a lucene index) and I saw Ibatis was caching
all the rows and not freeing up the cache which resulted in an OOM.
I reduced the number of rows fetched, and looped it till all rows were
fetched, and the job worked perfectly well. The downside was the performance
hit as there were too many trips between the App and DB. I was able to
afford it as it was a nightly. We were using Stored procs and Couldnt
configure OS cache or anything because of this. Hope it helps.

-Sundar

On Tue, Oct 21, 2008 at 9:25 AM, <ankit.khujneri@wipro.com> wrote:

> Larry,
>
> Using the query for list in loop will allow me to fetch limited set of
> record per DB call and at the same time executing the logic with the
> available set. Let me know your thoughts
>
> Regards
> Ankit
>
> -----Original Message-----
> From: Larry Meadors [mailto:larry.meadors@gmail.com]
> Sent: Tuesday, October 21, 2008 8:16 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Avoid java heap space while using iBatis
>
> Why do you think queryForList in a loop will work better?
>
> Larry
>
>
> On Tue, Oct 21, 2008 at 8:30 AM,  <ankit.khujneri@wipro.com> wrote:
> > Hi,
> >
> > Our project is facing a java heap space issue while fetching the
> > record set of around 200,000.
> > Using a row handler is not helpful as the same record set is being
> > used to plot a slider and three graphs on UI (Flex).
> >
> > increasing the heap space size is not allowed in our application as it
>
> > is a standard set by user.
> >
> > The sqlMapConfiguration has cacheModeEnabled set to true.
> >
> > Is there any way to optimize the record usage in iBatis?  Can we use
> > multiple queryForList in a loop ? If yes, how this can be achieved?
> >
> > Thanks & Regards
> > Ankit
> >
> > Please do not print this email unless it is absolutely necessary.
> >
> > The information contained in this electronic message and any
> > attachments to this message are intended for the exclusive use of the
> > addressee(s) and may contain proprietary, confidential or privileged
> > information. If you are not the intended recipient, you should not
> > disseminate, distribute or copy this e-mail. Please notify the sender
> > immediately and destroy all copies of this message and any
> attachments.
> >
> > WARNING: Computer viruses can be transmitted via email. The recipient
> > should check this email and any attachments for the presence of
> > viruses. The company accepts no liability for any damage caused by any
>
> > virus transmitted by this email.
> >
> > www.wipro.com
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>

Mime
View raw message