[英]When stored procedure returns 17 million rows, it's throwing out of memory while accessing dataset in Delphi
I'm using Delphi 6 for developing windows application and have a stored procedure which returns around 17 million rows.我正在使用 Delphi 6 开发 windows 应用程序,并且有一个返回大约 1700 万行的存储过程。 It takes 3 to 4 minutes while returning data in SQL Server Management Studio.
SQL Server Management Studio返回数据需要3到4分钟。
And, I'm getting an "out of memory" exception while I'm trying to access the result dataset.而且,当我尝试访问结果数据集时,出现“内存不足”异常。 I'm thinking that the
sp.execute
might to executed fully.我认为
sp.execute
可能会完全执行。 Do I need to follow any steps to fix this or shall I use sleep()
to fix this issue?我需要按照任何步骤来解决这个问题还是应该使用
sleep()
来解决这个问题?
Your software design is wrong.你的软件设计是错误的。 As James Z and Ken White already pointed out: there can't be a scenario where you need all those dataset at once, much less the user to view them all at once.
正如James Z和Ken White已经指出的那样:不可能存在您同时需要所有这些数据集的场景,更不用说用户一次查看它们了。 I feel sorry for the poor souls that yet had to use that software - who knows what else is misconcepted there.
我为那些不得不使用该软件的可怜人感到难过——谁知道那里还有什么误解。 The memory consumption should remain at sane levels.
memory 消耗应保持在正常水平。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.