我应该从MS-SQL服务器下载一个表.
行数大于600万.服务器无法一次返回整个数据.
所以,我写了一个代码,一次下载10,000行.并且,它绑定循环中的行.
假设getData()函数一次返回一个包含10000行的数据帧.(伪代码)
for(i in 1:600)
{
tempValue <- getData()
wannagetValue <- rbind(wannagetValue,tempValue)
print(i)
}
Run Code Online (Sandbox Code Playgroud)
问题是随着时间的推移它会变慢.
我认为像这样使用rbind并不是一个好主意.
任何建议都会非常有帮助.先感谢您.
r ×1