- 论坛徽章:
- 0
|
用JDBC连接mysql进行
select * from log查询时,
由于表的数据相当多,
当一执行st.executeQuery("select * from dhcp_log")
就报内存溢出错误
可以使用useCursorFetch属性,从而使问题得到解决。
使用该参数确会有 The statement (1) has no open cursor.异常风险。
useCursorFetch
If connected to MySQL > 5.0.2, and setFetchSize() > 0 on a
statement, should that statement use cursor-based
fetching to retrieve rows?
false
5.0.0defaultFetchSize
The driver will call setFetchSize(n) with this value on all
newly-created Statements
0
3.1.9
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8912/showart_1995685.html |
|