ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff P <killingd...@hotmail.com>
Subject Re: Excessive memory usage (feature or bug?)
Date Tue, 20 Jan 2009 23:46:10 GMT

Thank you alot, Larry!!!

It really scared the hell out of me when I checked the profiler and saw that
1 query used so much memory. 
I can confirm that using your technique reduced ram usage to 5mb (which is
practically nothing!)

Thanks again!

Larry Meadors wrote:
> Ha, yeah, it's the driver for sure. You'll get the same results if you
> prepare and execute the statement yourself instead of using ibatis.
> I remember when looked at the source for the pgsql driver some time
> ago - it does a similar thing - it fetched the results of the query
> into a big freaking byte[][] structure (assuming that you'll need it
> all) then walked through it as I called rs.next().
> Even a RowHandler won't help because it's happening before ibatis gets
> to touch the data - it happens when you execute the statement.
> Use the limit trick in your select statement. It's the only way to
> prevent this problem if the driver does this.
> Larry
> On Tue, Jan 20, 2009 at 11:34 AM, Jeff P <killingdjef@hotmail.com> wrote:
>> For what its worth... my profiler says the 3 biggest memory hogs are:

View this message in context: http://www.nabble.com/Excessive-memory-usage-%28feature-or-bug-%29-tp21568317p21574300.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message