SQL 存储过程到 Matlab 数据传输 - 内存不足
我在 SQLserver 上有一个由 Matlab 执行的存储过程。该过程返回大约 150 万
行。我的操作系统是 XP x32,Matlab 版本是 2011a 32 位。每当我尝试获取此数据时,都会收到 Java 堆内存大小错误。我尝试使用 rowLimit 作为 200000 但仍然遇到相同的错误。有趣的是,当存储过程返回<700000 行时,SQL 数据很容易传输。 (如果你想知道的话,有 15 列)。
clear all % free all available memory
conn = database('xxx' , 'userid', 'passwrd') ; % works fine
setdbprefs('DataReturnFormat','numeric'); % works fine
curs = exec(conn,'execute xxxxxx') ; % works fine
fetch(curs) OR fetch(curs,200000) ; --> java.lang.OutOfMemoryError: Java heap space
您能建议一种导入此类数据集的方法吗?谢谢!
I have a stored procedure on SQLserver that is executed by Matlab. The procedure returns some 1.5million
rows. My OS is XP x32 and Matlab version is 2011a 32-bit. Whenever I try to fetch this data, I get a Java Heap Memory Size error. I tried using rowLimit as 200000 but I still got the same error. Interestingly, SQL data is easily transferred when the stored procedure returns <700000 rows. (if you want to know, there are 15 cols).
clear all % free all available memory
conn = database('xxx' , 'userid', 'passwrd') ; % works fine
setdbprefs('DataReturnFormat','numeric'); % works fine
curs = exec(conn,'execute xxxxxx') ; % works fine
fetch(curs) OR fetch(curs,200000) ; --> java.lang.OutOfMemoryError: Java heap space
Can you suggest a way to import such data sets? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试增加 JVM 的堆大小。请参阅这篇文章了解如何操作
http://www.mathworks.com/support/ Solutions/en/data/1-18I2C/index.html
关于实际要设置的大小,可以参考这个帖子:
Windows XP 上的 Java 最大内存
You can try to increase the heap size of the JVM. Refer to this article on how to do it
http://www.mathworks.com/support/solutions/en/data/1-18I2C/index.html
Regarding the actual size to set, refer to this thread:
Java maximum memory on Windows XP