Java Mailing List Archive

Home » user-java.ibatis »

Performance retrieving list of strings.

Diran Ayandele


Replies: Find Java Web Hosting

Author LoginPost Reply
  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"
    select distinct $columnName$ from $tableName$
    <isNotEmpty property="filterName">
       where filter_name = '$filterName$'
    order by $columnName$

Here is the calling method:

  public List getFilter(FilterEnum fe) {
    List filter = new ArrayList();
    try {
       log.debug("Starting query for filter: " +;
       filter = occSqlMap.queryForList("filter", fe);

       log.debug("Filter for " + + " returned " +
filter.size() + " row(s)");
    } catch (SQLException e) {
       log.error("Unable to retrieve filter", e);
    return filter;

Thanks in advance for any help!

To unsubscribe, e-mail: user-java-unsubscribe@(protected)
For additional commands, e-mail: user-java-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.