ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Excessive memory usage (feature or bug?)
Date Tue, 20 Jan 2009 19:22:56 GMT
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:
>

Mime
View raw message