ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diran Ayandele <Adediran.Ayand...@Sun.COM>
Subject Performance retrieving list of strings.
Date Tue, 06 Oct 2009 17:45:07 GMT
    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: " + 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!

To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message