title: Springjdbc template select query execution is taking long time
body: <p>i am executing one select query using Springjdbc template and it is returning nearly 1000 ids as a set. but it is taking 10 mins time for execution using Spring jdbc template.
  but in Toad, same query is executing with in seconds.</p>
  
  <p>can any one pls help me regarding this?</p>
  
  <p>and i am using below code: </p>
  
  <pre><code>return (HashSet)this.jdbcTemplate.query(
     (String) sqlMap.get("SQL_NRChargePromoApIDList"), new Object[] {  }, new DataMapperAPID());
  
  public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
          HashSet compList = new HashSet();        
          compList.add(rs.getString("ap_id"));
          while(rs.next()){
              compList.add(rs.getString("ap_id"));
          }
          return compList;
        }
  </code></pre>