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

33,766

Solution 1

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

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

Solution 2

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.

Solution 3

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

Solution 4

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

Share:
33,766
vel
Author by

vel

Updated on July 28, 2022

Comments

  • vel
    vel almost 2 years

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

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