oracle Clob字段的读取效率问题
我想取出CLOB字段的内容采用自定义类中的方法(如下):
public String getContent(String id,String flag){//仅仅取内容
try
{
oracle.sql.CLOB clob=null;
flag="";
String ct="";
String str_SQL = new String("select content from kfq.infoCollect where autoid = '"+id+"' order by inDate desc");
ResultSet rsContent_true = super.executeQuery(str_SQL);
if(rsContent_true.next()){
clob = (oracle.sql.CLOB)rsContent_true.getClob(1);
if(clob!=null){
Reader is=clob.getCharacterStream();
BufferedReader br=new BufferedReader(is);
String s = br.readLine();
while(s!=null){
ct+=s;
s = br.readLine();
}
}
rsContent_true.close();
}
return ct;
}
catch(Exception ex){
System.err.println(" InfoCollect..getCollect():" + ex.getMessage());
return null;
}
}
当有上万字符的时候读取速度异常的慢,各位高手帮忙看看有什么更好的办法,谢谢,欢迎讨论