SQL 存储过程到 Matlab 数据传输 - 内存不足

发布于 2024-12-02 03:37:30 字数 632 浏览 4 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

轮廓§ 2024-12-09 03:37:30

您可以尝试增加 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文