虽然我不知道为什么..
但是j2ee的效率绝对不会低的,你到上海市档案馆里去查一下(基于j2Ee),提取十万条记录,也不会超过3秒的响应。

解决方案 »

  1.   

    可能是服务器的问题,j2ee对机器的要求太高了
      

  2.   

    需要查询的SQL语句是:select A.InOutID,A.AdviceCode,A.AdviceContent,A.StartTime,A.StopTime, A.Status from inadvice A,inpatient B where A.InOutID = B.inpatientid and A.advicecode ='E0002' and A.inorout='1' and  B.area='1010600' and B.doctorid='SW4' and B.status in ('2','3') order by A.starttime;
        调用语法:      Debug.println("start ......");
    PreparedStatement pst = conn.prepareStatement(sql);
    ResultSet rs = pst.executeQuery();
    Debug.println("已经取得结果集......");
       使用过程中发现在两个打印之间时间特别长,将SQL语句放到 Sql Server中的查询分析器中查询效率是很快的。郁闷啊?