Hello.
My application is using iBatis' method "querForList". However, after I
execute this method my memory useage sky-rockets upwards. I have profiled my
application and it happends when I execute the following method:
public static List<City> selectUnsyncedCityByDate(SyncDates syncDates,
int skip, int max) throws SQLException
{
return
BaseSqlMapper.sqlMapper.queryForList("selectUnsyncedCityByDate",
syncDates, skip, max);
}
This method executes a simple
"Select * from city where syncDate < ? and syncDate > ?"
The table contains roughly 300,000 records. I assumed fetching them all
would give me trouble so I used the "skip" and "max" parameters of the
method. However, even when the queryForList returns a list that has been
limited to 1 (!) result, still jump up from 5mb to 60mb.
I have taken notice of the queryWithRowhandler and will try to see if that
solves anything. It likely will but still I find it strange that when you
limit a result set to only one, the memory used increases that much. Could
someone explain to me why this is?
Thank you!
--
View this message in context:
http://www.nabble.com/Excessive-memory-usage-%28feature-or-bug-%29-tp21568317p21568317.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.