Hi,
I have a set of 30K rows, actually just strings, that I need to
return to my application. The query that generates them runs very
quickly in 3 seconds according to the log, but then building out the
results into a list of strings takes up to 3.5 minutes. Are there any
simple things I am missing to get this to run in a reasonable amount of
time? Could I return something else that would work better? I tried it
with a result map and my own bean, but it didn't go any faster. No, I
haven't migrated to iBatis 3 yet...
Here is the statement:
<select id="filter" resultClass="string"
parameterClass="com.sun.occ.vo.FilterEnum" remapResults="true"
cacheModel="filterCache">
select distinct $columnName$ from $tableName$
<isNotEmpty property="filterName">
where filter_name = '$filterName$'
</isNotEmpty>
order by $columnName$
</select>
Here is the calling method:
public List getFilter(FilterEnum fe) {
List filter = new ArrayList();
try {
log.debug("Starting query for filter: " + fe.name());
filter = occSqlMap.queryForList("filter", fe);
log.debug("Filter for " + fe.name() + " returned " +
filter.size() + " row(s)");
} catch (SQLException e) {
log.error("Unable to retrieve filter", e);
}
return filter;
}
Thanks in advance for any help!
Diran
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org