我正在使用java和oracle。
public List<Map<String, String>> TWrongData()throws Exception{
Statement mStmt=null;
ResultSet rs = null;
try{
mStmt = this.conn.createStatement();
StringBuffer sbSql= new StringBuffer();
sbSql.append( " SELECT NB,DA,S,T " );
sbSql.append( " FROM YS_DBA01_QX WHERE T is null AND S<>0 " );
rs=mStmt.executeQuery(sbSql.toString());
ArrayList<Map<String, String>> list = new ArrayList<Map<String, String>>();
while(rs.next()){
Map<String, String> map = new HashMap<String, String>();
map.put("NB",rs.getString("NB"));
String RQ=CommonUtils.DateFormat(rs.getDate("DA"));
map.put("DA",DA);
list.add(map);
}
return list;
}catch(Exception e) {
e.printStackTrace();
}finally {
JDBResourceKit.release(rs);
JDBResourceKit.release(mStmt);
}
return null;
SELECT JH,RQ,CYFS,PL FROM YS_DBA01_QX WHERE PL is null AND SCSJ<>0 execute time:31
java.sql.SQLException: result row count is large threshold[100000] sql: SELECT JH,RQ,CYFS,PL FROM YS_DBA01_QX WHERE PL is null AND SCSJ<>0
at com.efounder.sql.EAIResultSet.next(EAIResultSet.java:550)
at com.zyof.server.xypc.djj.JPLService.PLWrongData(JPLService.java:67)
我在网上搜索了很长时间。但没用。请帮助或尝试提供一些如何实现这一目标的想法。
提前致谢。
答案 0 :(得分:0)
您可能拥有超过100000条记录。 尝试设置一些限制,如:
SELECT * FROM XXX LIMIT 5000