csstome 发表于 2013-2-3 10:42:29

jdbc查询超大数据集内存溢出

今天使用jdbc的PreparedStatement查询语句如下:
 
<div class="dp-highlighter">
[*]Class.forName("com.mysql.jdbc.Driver");  
[*]        String url = "jdbc:mysql://localhost:3306/translate?characterEncoding=utf8";  
[*]        String sql = "select id, title, search_title, content from article";  
[*]        Connection conn = DriverManager.getConnection(url, "root", "123456");  
[*]        PreparedStatement ps = conn.prepareStatement(sql);  
[*]        ResultSet rs = ps.executeQuery();  
[*]        rs.close();  
[*]        ps.close();  
[*]        conn.close();  
页: [1]
查看完整版本: jdbc查询超大数据集内存溢出