C# 我可以加载到 .Net 内存中的数据表的最大大小是多少?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11123074/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-09 16:35:51  来源:igfitidea点击:

What is the maximum size of a DataTable I can load into memory in .Net?

c#.netado.netdatatable

提问by pencilCake

What is the maximum size of a DataTable I can load into memory in .Net?

我可以加载到 .Net 内存中的数据表的最大大小是多少?

Is there an artificial limitation, or it is only limited by the box I am running the code on?

是否存在人为限制,还是仅受我运行代码的框的限制?

采纳答案by jamesmillerio

While I'm not sure of the memory footprint, there is a maximum number of rows. From MSDN:

虽然我不确定内存占用量,但有最大行数。从MSDN

The maximum number of rows that a DataTable can store is 16,777,216.

DataTable 可以存储的最大行数是 16,777,216。

回答by Josh

According to this link, it is based on your machine...but I like the link because if you are wondering about the limits, you might be doing something wrong.

根据此链接,它基于您的机器...但我喜欢该链接,因为如果您想知道限制,您可能做错了什么。

回答by Aket Gupta

The maximum size is limited by Int32. So 2^32 is the maximum number of DataTables you can hold inside a DataSet. So the max size is 2 billion. that is approximately 4GB

最大大小受 Int32 限制。所以 2^32 是一个 DataSet 中可以容纳的最大数据表数。所以最大大小是 20 亿。那大约是 4GB

回答by Vivian Dsouza

The maximum number of rows that a DataTable can store is 25,558,144 (visual Studio 2016)

DataTable 可以存储的最大行数为 25,558,144(visual Studio 2016)