simpleJdbcTemplate批量插入数据问题
/** * 查询数据 * @param fetchSize * @return * @throws InterruptedException */ public List queryData(int fetchSize) throws InterruptedException { long start = System.currentTimeMillis(); System.out.print("开始查询>>>> "); Map map = new HashMap(); String sql = "SELECT * FROM (SELECT ROW_NUMBER() OVER ( ORDER BY recordid) ROWNUM, * FROM " + sourceTabName + ") CAL WHERE ROWNUM BETWEEN ( " + maxRows + " * " + fetchSize + " ) + 1 AND " + maxRows + " *(" + fetchSize + "+1) ORDER BY recordid"; System.out.println("sql=== "+sql); List list = simpleJdbcTemplate.queryForList(sql, map); long end = System.currentTimeMillis(); System.out.println("查询:" + (end - start) + "ms"); start = System.currentTimeMillis(); return list; }